Add support for an advanced task scheduler managed by the application.

can you add a test where a task queue is started async, then completed sync?