
An interface for objects that can be run by a thread. More...
#include <thread.hpp>
Public Member Functions | |
| Runnable (bool d=true) | |
| Initialize, d defines whether object is deleted when terminated. More... | |
| void | todelete (bool d) |
| Set whether to delete upon termination. More... | |
| bool | todelete (void) const |
| Return whether to be deleted upon termination. More... | |
| virtual Terminator * | terminator (void) const |
| Return terminator object. More... | |
| virtual void | run (void)=0 |
| The function that is executed when the thread starts. More... | |
| virtual | ~Runnable (void) |
| Destructor. More... | |
Static Public Member Functions | |
| static void * | operator new (size_t s) |
| Allocate memory from heap. More... | |
| static void | operator delete (void *p) |
| Free memory allocated from heap. More... | |
An interface for objects that can be run by a thread.
Definition at line 264 of file thread.hpp.
|
inline |
Initialize, d defines whether object is deleted when terminated.
Definition at line 40 of file thread.hpp.
|
inlinevirtual |
Destructor.
Definition at line 280 of file thread.hpp.
|
inline |
Set whether to delete upon termination.
Definition at line 43 of file thread.hpp.
|
inline |
Return whether to be deleted upon termination.
Definition at line 47 of file thread.hpp.
|
inlinevirtual |
Return terminator object.
Reimplemented in Gecode::Search::Par::Engine< Tracer >::Worker.
Definition at line 276 of file thread.hpp.
|
pure virtual |
The function that is executed when the thread starts.
Implemented in Gecode::Support::RunJobs< Jobs, RetType >::Deleter, Gecode::Support::RunJobs< Jobs, RetType >::Worker, Gecode::Search::Par::Slave< Collect >, Gecode::Search::Par::Slave< Gecode::Search::Par::CollectBest >, Gecode::Search::Par::DFS< Tracer >::Worker, and Gecode::Search::Par::BAB< Tracer >::Worker.
|
inlinestatic |
Allocate memory from heap.
Definition at line 55 of file thread.hpp.
|
inlinestatic |
Free memory allocated from heap.
Definition at line 51 of file thread.hpp.