I implement two features A and B. B depends on A. ...
# ktor
c
I implement two features A and B. B depends on A. I call environment.monitor.subscribe(ApplicationStopping) to do shutdown task in the feature install function respectively. But the shutdown order is A → B, not B → A because ktor call addLast(registration) in ApplicationEvents.subscribe() Does anyone has workaround?
a
Why would you want to rely on an order of notifications?
c
I want to close coroutine channel before server stopped for graceful shutdown. I create channels for different asynchronous task. The last channel I want to close is writing log to database (e.g. login log, request log and error log)