Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MCThreadListener Class Reference

Thread event listener. More...

#include <MCThreadListener.h>

Inheritance diagram for MCThreadListener:

MCEventListener MCRefCount List of all members.

Public Member Functions

virtual void onThreadExit (mcthreadid_t threadId)
 Called when thread exits.
virtual void onThreadStart (mcthreadid_t threadId)
 Called when a thread starts.
virtual ~MCThreadListener ()
 Allow virtual delete.

Detailed Description

Thread event listener.

Thread events are generated when threads start and exit. Registered listeners are notified of these events when they occur by methods being called on the listener.


Member Function Documentation

virtual void onThreadExit mcthreadid_t  threadId  )  [virtual]
 

Called when thread exits.

Derived classes override this to be signalled when a thread exits. The default implementation does nothing. Using MCThread::getCurrentThread() from this method in derived classes yields the MCThread which has just exited (i.e. the one with the specified threadId). Note. The name of the thread is no longer available at thread exit.

Parameters:
threadId the id of the thread which is exiting.

virtual void onThreadStart mcthreadid_t  threadId  )  [virtual]
 

Called when a thread starts.

Derived classes override this to be signalled when a thread starts. The default implementation does nothing. Using MCThread::getCurrentThread() from this method in derived classes yields the MCThread which has just started (i.e. the one with the specified threadId)

Parameters:
threadId the id of the thread which is starting.


Generated on Wed Jan 12 19:05:50 2005 for MCLLIB by  doxygen 1.3.9.1