delegate to run inside a task. Return value of the delegate will be propagated as the return value of quickRun itself, which can used as app exit status code.
int main ( ) { // Make sure the scheduler is initialized first, e.g.: // initScheduler(SchedulerConfiguration.init); return quickRun({ // code that has to run inside task return 42; }); }
Turns dg into a task and runs it through scheduler. Starts the event loop automatically and will finish only when all tasks finish and no registered events remain (or theScheduler.shutdown is called).
Requires initScheduler to be already called before.