Closed mfranciszkiewicz closed 5 years ago
@Krigpl Any comments? Can we merge this?
I just wonder whether having a separate class here instead of providing empty methods directly in the handler has any added value. I imagine that usually some resources will be used both by the main handler and the lifecycle handler and things may get awkward. But otherwise ok.
@mfranciszkiewicz Plz bump to v0.15.0 because I already released 0.14.0 with the shutdown change.
The main responsibility of the
AppLifecycleHandler
class is to enable custom code execution before/afterAppServer._server
startup/shutdown. This pins the potential points of execution of the following:The
AppLifecycleHandler
is currently a stub of a planned default implementation responsible for thread management (indirectly).Additionally,
AppLifecycleHandler
objects:shutdown_future
request_shutdown
method, resolving the aforementioned future