Cross-platform threads implementation
[WpcObj programmer's guide]

Cross-platform threads wrapper

PtThreads package is a set of source files which implements C++ wrappers over the thread manipulation objects. At this moment package provides three classes PtEvent, PtMutex and PtThread.

On Win32 systems this package covers the kernel objects such as thread, event and mutex. On Linux-based systems the pthread library is used as underlaying level.

These group may be used separately, and doesn't require all classes in the WpcObj library. You can even link to binary library without any overheads in resulting programm code. But the including source code of the PtThreads into your project is the preffered solution.

Acknowledgements

Download

You may download PtThreads separately from WpcObj by the direct link: SourceForge files.

Classes

class  PtEvent
 Event class. More...
class  PtMutex
 Mutex class. More...
class  PtMutexLocker
 MutexLocker class. More...
class  PtThread
 Thread class. More...

Enumerations

enum  PtThreadState { ThreadStateIdle, ThreadStateRunning, ThreadStateFinished, ThreadStateFault }
 Values that represent PtThread state. More...

Functions

void PtSleep (unsigned int msec)
 Cross-platform implementation of the Sleep function.


Enumeration Type Documentation

Values that represent PtThread state.

Author:
A. Abramov, 13.05.2009.
Enumerator:
ThreadStateIdle  thread is currently suspended
ThreadStateRunning  thread is currently executing
ThreadStateFinished  thread is finish the work
ThreadStateFault  an error has occured and the thread could not be launched


Function Documentation

void PtSleep ( unsigned int  msec  ) 

Cross-platform implementation of the Sleep function.

Author:
A. Abramov, 13.05.2009.



 
©2009 Positive Technologies
 
Generated on Fri May 22 18:17:00 2009 for wpcObj by 
 
 
1.5.7
 
Get wpcObj at SourceForge.net. Fast, secure and Free Open Source software downloads