I am creating tasks by inheriting from Greenlet
. I have a single parent task that calls start()
on two children in its _run()
. Elsewhere (it happens to be a systemd service) start()
and join()
are called.
The behavior seems correct. For example the use of a Queue
with timeouts achieves the desired effect but I haven't found a good way to shutdown the children from say KeyboardInterrupt
or by registering a callback to the parent task for SIGTERM
. In the handler I would call child1.kill()
and 'child2.kill()but only the first called seemed to raise
GreenletExit`.
I never call join()
on the children and I'm not sure how I would do this properly. Am I misusing the library?