8000 GitHub - bmartini/worker-threads: Simple boss & long lived worker pthread example
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bmartini/worker-threads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple example of boss/worker pthreads

Simple example code that performs some 'blocking' function inside a worker thread. The boss creates a number of tasks threads of different types which will wait until the boss updates their parameters and then 'starts' them on whatever particular type of task that have been given. The boss at some later time will block on waiting for the worker threads to finish their tasks. Once the worker has finished their task it will hold again until the boss re-starts them.

The worker threads are created and destroyed at the start and end of the applications life time. Usage its usage is very similar to 'create'/'join' without the overhead of having to create a new thread each time work is needed.

About

Simple boss & long lived worker pthread example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0