Skip to content

organize and run thread tasks, which can be stopped, continued and restarted

License

Notifications You must be signed in to change notification settings

ChristophGaukel/thread_task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thread_task is built on top of threading and allows to organize tasks and run them parallel.

You can:

  • build chains of tasks, which execute tasks sequentially in a single thread
  • build parent-child relationships, which allows to construct trees of tasks
  • stop tasks, which also stops the execution of child tasks
  • continue tasks, which also continues the execution of child tasks
  • restart finished or stopped tasks
  • join tasks, which means waiting until the task and its children are finished

A thread_task is not like a function, it doesn't return results. Think of it as an instruction to a reliable but independently acting person. If feedback is needed, this can be done by callback functions. Communication between tasks is possible by mutable objects, which can be red or changed by multiple tasks.

The following task types exist:

  • Task: Executes a single callable or a chain of callables.
  • Repeated: Executes a callable multiple times.
  • Periodic: Executes a callable periodically
  • Sleep: Sleeps for a given time, is similar to time.sleep, but can be stopped and continued

Read thread-task.readthedocs.io for more details.

About

organize and run thread tasks, which can be stopped, continued and restarted

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages