#include <MTmgr.hh>
Inheritance diagram for RazorBack::MTmgrbase_:
Public Methods | |
MTmgrbase_ () | |
Init to empty. | |
virtual | ~MTmgrbase_ () |
dtor: reap all threads still running. | |
virtual size_t | launch (size_t Threadno, Threadstartfn_ Startfn, void *Arg)=0 |
launch(Threadno, Startfn, Arg): launches Threadno threads. More... | |
virtual void | reap ()=0 |
reap(): reap all threads currently running. More... | |
virtual void | reap (pthread_t ID)=0 |
bool | empty () const |
empty(): returns true when no threads are running. | |
size_t | thread_no () const |
thread_no(): returns the number of currently running threads. | |
bool | is_running (pthread_t ID) const |
is_running(ID): returns true if the thread identified by ID is running. | |
const list<pthread_t>& | run_list () const |
run_list(): enables const access to the list of thread IDs. | |
Static Public Methods | |
size_t | get_cpuno () |
get_cpuno(): returns the number of CPUs. More... | |
Protected Attributes | |
list<pthread_t> | Threads |
list of thread IDs. | |
Private Methods | |
MTmgrbase_ (const MTmgrbase_ &) | |
MTmgrbase_& | operator= (const MTmgrbase_ &) |
Classes derived from this ABC can launch new threads and stop them (all or some).
Definition at line 62 of file MTmgr.hh.
|
Init to empty.
|
|
dtor: reap all threads still running.
|
|
|
|
launch(Threadno, Startfn, Arg): launches Threadno threads. These start execution in the global C function pointed to by Startfn, with argument Arg. Returns the number of threads actually launched. Reimplemented in RazorBack::MTmgrjoin_, and RazorBack::MTmgrdetach_. |
|
reap(): reap all threads currently running. reap(ID): reap the thread identified by ID. Do nothing if that ID is nonexistent. Reimplemented in RazorBack::MTmgrjoin_, and RazorBack::MTmgrdetach_. |
|
Reimplemented in RazorBack::MTmgrjoin_, and RazorBack::MTmgrdetach_. |
|
get_cpuno(): returns the number of CPUs. Very architecture- and OS-dependent. |
|
empty(): returns true when no threads are running.
|
|
thread_no(): returns the number of currently running threads.
|
|
is_running(ID): returns true if the thread identified by ID is running.
|
|
run_list(): enables const access to the list of thread IDs.
|
|
|
|
list of thread IDs.
|