Calling zk_client.stop()
from a worker greenlet causes a deadlock
#426
Labels
zk_client.stop()
from a worker greenlet causes a deadlock
#426
PoC:
Actual output:
zk.stop()
pushes a_STOP
to the worker's queue and then joins on the greenlet. However, the worker never gets to process the_STOP
message, as it's stuck waiting forf
to complete.The documentation should probably be improved, or a fix should be considered (maybe a
stop_async
?).The PoC also illustrates a second issue:
zk.stop()
is registered to run atexit, so the python script above never terminates (only onezk.stop()
can run at a time, and the first run is frozen). Registering an atexit callback that blocks should be avoided.The text was updated successfully, but these errors were encountered: