Skip to content

Task scheduler

localghost edited this page Jun 4, 2015 · 3 revisions

Support for timed tasks

Ideas on how to support timed tasks:

  • Thread scheduler could be a template that would take a type of the queue it should use internally by the threads it manages (in fact, the threads would be managed by a threadpool that would be used by the scheduler). In such solution, thread scheduler could be specialized for queues (or other containers) that support timed tasks (this would be discovered with the use of some queue_traits). And for them it could have an extended interface that would allow posting timed tasks.
  • Thread scheduler could have a separate (from the queues hold by worker threads) queue that would support timed tasks and this queue would inject tasks to worker threads' queues (to the front of the queue) when the tasks should be executed.
  • Timed task could be a special case of a task accepted only by specific queue types and compilation would fail if someone tries to post a timed task to a task scheduler with queue type that does not support timed tasks.

Distributes tasks scheduling

TODO (issue #59)

Clone this wiki locally