For anyone reading the above snippets and wondering how come the async tasks 
get processed at all, `waitFor someFuture` will complete all ongoing async work 
(including "detached" work like that of `asyncSpawn` but return only when the 
particular given future is finished.

It is unusual in async applications to use `asyncSpawn` and indeed `poll` 
directly, except in toy examples and scripts where error handling isn't done / 
crashing back to the shell is fine.

Typical chronos applications have a single `main(): Future[void]` and are run 
with `waitFor main()` just like a "normal" application has a single non-async 
`main` entry point (hidden in the case of Nim, but still ..).

Anyway, this was all a bit of a detour from the original question in the 
thread. No idea how to solve this problem with asyncdispatch, if at all 
possible.

Reply via email to