mt4cpp
|
#include <Scheduler.hpp>
Public Member Functions | |
Scheduler (int) | |
CommandID | executeAsynchronously (PCommand cmd) |
CommandID | executeSynchronously (PCommand cmd) |
void | join () |
void | finishAndJoin () |
Sheduler, the execution queue with and thread pool. it executes commands (synchronically or asynchronically)
|
inline |
Executes the command in one of threads from threads pool. Do not break execution of the calling thread.
asynchronically executes the command. Do not break execution of the calling thread.
References mt4cpp::CommandQueue::write().
Referenced by executeSynchronously().
|
inline |
Executes the command in one of threads from threads pool. Command is inserted into command queue, it waits till free working thread is found, then it is executed. The calling thread waits (on condition variable) till the command is finished.
asynchronically executes the command. Command is inserted into command queue, it waits till free working thread is found, then it is executed. The calling thread waits (on condition variable) untill the command is not finished.
References executeAsynchronously().
|
inline |
wait for ending threads in pool
Referenced by finishAndJoin().
|
inline |
signal to finish all threads after current command and wait for ending threads in pool
signal to finish all threads after current command, and wait for endint the threads in pool
References join(), and mt4cpp::CommandQueue::setQuitFlag().