You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi again,
So we use our own threads with mosquitto. We are calling mosquitto_new from Thread 1 and mosquitto_loop_forever from Thread 2. Now, mosquitto_new assigns thread_self() as thread_id which is in our case Thread 1 id. _mosquitto_destroy calls then pthread_cancel on it so Thread 1 is canceled.
We were able to workaround this by moving everything to Thread 2, but I think mosquitto should destroy threads only in case mosquitto_loop_start is called which is signal to mosquitto to use its own threads.
Does this make sense?
The text was updated successfully, but these errors were encountered:
libmosquitto shouldn't cancel threads it didn't create. This change
allows us to keep track of whether threads were created by the library
or by external code.
Thanks to Josip Ćavar.
Bug: #166
Hi again,
So we use our own threads with mosquitto. We are calling
mosquitto_new
from Thread 1 andmosquitto_loop_forever
from Thread 2. Now,mosquitto_new
assignsthread_self()
asthread_id
which is in our case Thread 1 id._mosquitto_destroy
calls thenpthread_cancel
on it so Thread 1 is canceled.We were able to workaround this by moving everything to Thread 2, but I think mosquitto should destroy threads only in case
mosquitto_loop_start
is called which is signal to mosquitto to use its own threads.Does this make sense?
The text was updated successfully, but these errors were encountered: