gatb.core-API-0.0.0
|
Factory that creates IThread instances. More...
#include <IThread.hpp>
Public Member Functions | |
virtual IThread * | newThread (void *(*mainloop)(void *), void *data)=0 |
virtual ISynchronizer * | newSynchronizer (void)=0 |
virtual IThread::Id | getThreadSelf ()=0 |
virtual u_int64_t | getProcess ()=0 |
virtual | ~IThreadFactory () |
Factory that creates IThread instances.
Thread creation needs merely the main loop function that will be called.
Note the method that can return the number of cores in case a multi-cores architecture is used. This is useful for automatically configure tools for using the maximum number of available cores for speeding up the algorithm.
|
inlinevirtual |
Destructor.
|
pure virtual |
Return the id of the current process.
Implemented in ThreadFactoryLinux, and ThreadFactoryMacos.
|
pure virtual |
Return the id of the calling thread.
Implemented in ThreadFactoryLinux, and ThreadFactoryMacos.
|
pure virtual |
Creates a new synchronization object.
Implemented in ThreadFactoryLinux, and ThreadFactoryMacos.
|
pure virtual |
Creates a new thread.
[in] | mainloop | : the function the thread shall execute |
[in] | data | : data provided to the mainloop when launched |
Implemented in ThreadFactoryLinux, and ThreadFactoryMacos.