![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
A Worker is a thread that runs a runnable. More...
#include <FXWorker.h>
Public Member Functions | |
| FXWorker (FXRunnable *r=NULL) | |
| Create worker for runnable. | |
| virtual FXint | run () |
| Run worker. | |
| virtual | ~FXWorker () |
| Destroy worker. | |
A Worker is a thread that runs a runnable.
When the runnable is done, the worker terminates itself. Thus this facility allows a job to outlive the thread that computes it [the idea being that a thread may be far more resources-expensive than the job itself]. Exceptions raised in the runnable are caught in the worker, so that the worker will properly terminate regarless how the runnable ended.
|
|