As part of a lib I'm working on it I spawn threads that each may use async and run arbitrary code by those using the lib.
When shutting down those threads I want to, before fully shutting them down, wrap up remaining async work that may be registered with the async-dispatcher.
The question is, how do I exactly do that?
std/asyncdispatch has various ways of dealing with this, but chronos does not provide a time-limited version of "poll", a "drain" proc or some way of checking "How much work do you still have to do?", so I'm a bit unsure on how to deal with this.