Rosetta
Namespaces
RosettaThreadPool.fwd.hh File Reference

A container for a pool of threads. Threads idle continuously until loaded with a function to execute. A subset of threads then execute the function synchronously and then return to the idle state. More...

#include <utility/pointer/owning_ptr.hh>
#include <utility/pointer/access_ptr.hh>

Namespaces

 basic
 Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input.
 
 basic::thread_manager
 

Detailed Description

A container for a pool of threads. Threads idle continuously until loaded with a function to execute. A subset of threads then execute the function synchronously and then return to the idle state.

Note
The basic verison of this class assigns functions to threads on a first-come, first-served basis. If I request 8 threads and 8 threads are idle, I get all 8 threads. If the next request also asks for 8 threads while I'm still using mine, it only gets the thread that made the request. Derived classes can implement different behaviour for assigning work to threads.
Author
Vikram K. Mulligan (vmull.nosp@m.igan.nosp@m.@flat.nosp@m.iron.nosp@m.insti.nosp@m.tute.nosp@m..org)