ginkgo
ginkgo copied to clipboard
Calling self.stop() from within a service's greenlet results in incomplete execution of self.stop()
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.
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