Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXWorker Class Reference

A Worker is a thread that runs a runnable. More...

#include <FXWorker.h>

Inheritance diagram for FX::FXWorker:
FX::FXThread FX::FXRunnable

List of all members.

Public Member Functions

 FXWorker (FXRunnable *r=NULL)
 Create worker for runnable.
virtual FXint run ()
 Run worker.
virtual ~FXWorker ()
 Destroy worker.

Detailed Description

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.


The documentation for this class was generated from the following file:

Copyright © 1997-2011 Jeroen van der Zijp