Supersedes #2866
As of #3492 the main loop is a asyncronous coroutine, however, the code is still synchronous.
Identify areas which can be made asyncronous and convert them.
Pull requests welcome!
Identify areas which can be made syncronous and convert them.
(Presumably you mean "asynchronous" there?)
The Scheduler main loop as it currently stands:
on:reload Reload TaskDefson:reload Rebuild Data StoreA cursory glance suggests we might be able to run with these groupings:
(async items should be parallel safe with their neighbours)
on:reloadasync Task Messagesasync Command Queueasync Task Eventsasyc Process SubProcPool (run callbacks?)async DB Writesasync update data storeasync DB Healthasync Timeoutasync Shutdownasync Filesystem Healthasync Suite Server Healthasync ProfileAt the moment we don't have the best handle on what takes the longest, the main gains would probably be with the DB writes, and DB/FS health check routines.
I may do some follow up work to the Main Loop Plugins PR to make all main loop functions asynchronous coroutines and run them through the cylc.flow.main_loop infrastructure (so we can time and monitor them) but run them synchronously.
After some whiteboard time I think this is the wrong way of approaching the problem. Will follow-up, probably with a new issue to explain this.
Converting main-loop functions to coroutines is of very little benefit unless we can break the main-loop lock-step.
Superseded by #3498