Open martinfinke opened 6 years ago
Hi!
Is there any way to get the full call stack for the stuck thread?
I have been poring over the code and I see one potential scenario that might cause this, but the part of the stack that I see, does not match this scenario.
Thanks!
In my application, RxCpp freezes in this line. It seems to depend on timing, and I think it's more likely to happen when the run loop (where it's being called) is running at longer intervals (more "slowly"). I'm using macOS 10.13.6.
When it freezes, there is only the main thread "active" (all other threads are sleeping and not calling RxCpp).
If I change
state_type::lock
to astd::recursive_mutex
(and change theunique_lock
s to fit), it fixes the problem. So it seems that the thread already owns the mutex, in which case the behavior withstd::mutex
is undefined.Attached is a partial call stack, starting from my
on_next
call.Call Stack.txt
Is it okay to replace it by
std::recursive_mutex
, or does that create other problems?