Hi, I'm using a subject, e.g. like in the https://github.com/david-hoze/RxCppAsioReproduction example, which is of course subscribed to, and in some real world example getting a deadlock (for some reason I couldn't reproduce the problem synthetically, so no repo for this one.. :smile:).
Hi, I'm using a subject, e.g. like in the https://github.com/david-hoze/RxCppAsioReproduction example, which is of course subscribed to, and in some real world example getting a deadlock (for some reason I couldn't reproduce the problem synthetically, so no repo for this one.. :smile:).
When I protected it with a mutex like so:
The deadlock stopped happening.. I read that subjects have no synchronization mechanisms, is that the reason why I deadlock?
If I for instance, use observe_on() when using
my_subject.get_observable()
like so:Will it prevent the deadlock so that I can get rid of the mutex?
Thanks, David.