Task Scheduler


When developing a multi-thread application, essentially it is all about setting up certain number of threads, executing an algorithm in each thread and then merging the threads to proceed with the results, and this library is designed to ease the multi-thread programming. Internally, it safely takes care of all routines so that a developer can focus on the tasks that he/she needs to execute and their priorities/dependencies.

To execute tasks, developers simply have to follow 3 steps:

Step 1 - Create Tasks: Inherit an appropriate class and override one of the functions to provide the execution logic/algorithm.  

Step 2 - Create Managers: Distribute created tasks among one or multiple instances of task managers.

Step 3 - Run the Scheduler: Set the thread count and load the managers for execution in multi-thread environment.

The library is very flexible of handling independent as well as dependent tasks with any complexity of task priorities. If tasks are independent, a manager is created for each task. If there is a dependency between tasks, there are several ways to setup priorities among tasks before adding them into a manager. Furthermore, the tool allows adding tasks in run time; thus, tasks are allowed to create and schedule other tasks as we go, which adds another level of flexibility to handle task priorities. The library also provides a flexible environment to handle successful and failed tasks.