dbp::thread Class Reference

System thread. More...

#include <thread.h>

Inheritance diagram for dbp::thread:
Inheritance graph
[legend]
Collaboration diagram for dbp::thread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 thread ()
 Constructor.
 thread (const thread &src)
 Constructor.
threadoperator= (const thread &src)
 Copy operator.
virtual void start ()
 Start the thread execution.
virtual void stop ()
 Stop the thread execution.
virtual void pause ()
 Pause the thread execution.
virtual void resume ()
 Resume of the thread execution.
virtual void on_execute (thread_int::execute_handler handler)
 Register the entry point execute handler.
virtual void wait_for ()
 Wait the thread for execution complete.

Detailed Description

System thread.

This class represents the system thread. The thread is concurrently running task, executed with your other code in parallel.


Member Function Documentation

virtual void dbp::thread::on_execute ( thread_int::execute_handler  handler  )  [virtual]

Register the entry point execute handler.

You need to register your own thread execution handler. When the thread starts, your execution handler will be used as entry point of the thread, so this is a place to put your code to make the thread to do something useful.

See the 'examples/threads' directory for the sample code.

Parameters:
handler an execute handler delegate.

Implements dbp::thread_int.

Referenced by operator=().


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

 
Support This Project
SourceForge.net Logo