In my code I don't always want my system to handle an incoming message just at that moment, so I create signals and that sort of things in the listeners to wake up appropriate mechanisms in the code. And when I handle these messages (I mean taking data from the datareader) I use take_next_sample method. But, unfortunately, after 1 or 2 messages, this method stucks giving no error. When I look at deeply, I saw that take_next_sample method tries to lock some database mutex and waits for the mutex (probably a deadlock or sth.). -- micro 2.4.7
The code itself sometimes work and sometimes don't due to this problem. And when it works, it gets invalid sample info sometimes. (Normally I should not get that much invalid data, I assume)
After searching on the forum I saw that some people did get a less troubled flow with take method but I assume in this case it might not be relevant because I initialize my variables as suggested in the answers of those problems.
What might be the problem? Where should I look? Could it be that when I try to get data from reader and another message comes something goes wrong? Beyond these, isn't it a problem that should be solved that library functions can stuck somehow?
I cannot share the whole code here due to some reasons :) (Even if I share, probably no one would understand. And I do not think it is necessary, neither.) But for any possibility that anyone thought of, I will try to be clear in response. Any help will be appreciated. Thank you in advance.