ginkgo icon indicating copy to clipboard operation
ginkgo copied to clipboard

Calling self.stop() from within a service's greenlet results in incomplete execution of self.stop()

Open hblanks opened this issue 12 years ago • 1 comments

If one of a service's greenlets calls self.stop(), that greenlet will be killed (as part of shutting down the gevent AsyncManger -- cf. gevent.py's do_stop() method) before self.stop() finishes execution.

This means that the service will never actually reach the "stopped" state, with the result that anything waiting on the service to stop before returning (such as serve_forever()) will wait indefinitely.

hblanks avatar Jul 11 '12 20:07 hblanks

It might be good to have a way for ginkgo to monitor children services and restart them if their state changes or encounters an unexpected exception

kelvl avatar Aug 21 '12 17:08 kelvl