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

FXEX::FXThreadManager Class Reference

A Thread Manager is required to be created in the main thread, for a few reasons:. More...

#include <FXThreadManager.h>

Inheritance diagram for FXEX::FXThreadManager::

FXEX::FXBaseObject FXObject List of all members.

Detailed Description

A Thread Manager is required to be created in the main thread, for a few reasons:.

1. It allows worker thread to call 'wait()' on themselves to do non-busy thread waiting. This then means that if we exit our main thread, the worker thread will be woken, thus allowing the main thread to exit.

2. It allows worker thread to communicate with the main thread using the 'signal()' method. Internally the signal() method uses a form of mainthread->handle(..), thus allowing worker threads to communication with the main thread using the standard FOX event handling technique.

Note, this means that worker threads cant do a mainthread->handle(..). The reason for this is that this would require a change to FOX at the lowest level which would severly impact performance for single threaded applications.

FXThreadManager is a singleton object, ie you should only create one of them.

Definition at line 53 of file FXThreadManager.h.