Antares Simulator
Power System Simulator
|
An ASynchroneous Job Dispatcher. More...
Functions | |
void | Post (const Yuni::Job::IJob::Ptr &job) |
Post a new job in the thread pool. | |
bool | Start () |
Start the ASync Dispatcher. | |
void | Stop (uint timeout=10000) |
Stop the ASync Dispatcher. | |
void | Wait () |
Wait for the end of all jobs. | |
bool | Empty () |
Get if some jobs are still running. | |
template<class C > | |
void | Post (const C *object, void(C::*method)()) |
Post a new event to run in the thread pool. | |
template<class C , class UserDataT > | |
void | Post (const C *object, void(C::*method)(), const UserDataT &userdata) |
Post a new event to run in the thread pool. | |
void | Post (const Yuni::Bind< void()> &job) |
Post a new event to run in the thread pool. | |
void | StudyNew (bool force=false) |
Create a new study. | |
void | StudyClose (bool force=false, bool closeMainFrm=false) |
Close the study. | |
void | StudyOpen (const String &folder, bool force) |
void | StudyOpen (const Yuni::String &folder, bool force=false) |
Open a study. | |
An ASynchroneous Job Dispatcher.
|
inline |
Post a new event to run in the thread pool.
Note: This method may run from any thread
|
inline |
Post a new event to run in the thread pool.
Note: This method may run from any thread
|
inline |
Post a new event to run in the thread pool.
Note: This method will be called from the any thread
void Antares::Dispatcher::Post | ( | const Yuni::Job::IJob::Ptr & | job | ) |
Post a new job in the thread pool.
Note: This job may run from any thread
void Antares::Dispatcher::Stop | ( | uint | timeout = 10000 | ) |
Stop the ASync Dispatcher.
timeout | The timeout (in milliseconds) for waiting for the working jobs |