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

AxPipe::CSync Class Reference

Thread synchronization. More...

#include <CSync.h>

List of all members.

Public Member Functions

 CSync ()
 Create the event and also set our error pointer.

 ~CSync ()
 Close the event.

bool Wait (int iMs=-1)
 Wait for someone to call Signal().

bool Signal ()
 Send a signal to someone who's waiting with Wait().


Private Attributes

HANDLE m_hEvent
 The event object to synchronize with.


Detailed Description

Thread synchronization.

Event-based thread synchronization.

Definition at line 44 of file CSync.h.


Member Function Documentation

bool AxPipe::CSync::Signal  ) 
 

Send a signal to someone who's waiting with Wait().

Returns:
true if it was possible to send the signal.
See also:
Signal()

Definition at line 61 of file CSync.cpp.

References ASSAPI, and m_hEvent.

Referenced by AxPipe::CThreadSync::WorkSignal(), and AxPipe::CThreadSync::WorkWait().

bool AxPipe::CSync::Wait int  iMs = -1  ) 
 

Wait for someone to call Signal().

Parameters:
iMs Milliseconds timeout value for the wait. -1 == Infinite.
Returns:
true if the wait terminated because someone called Signal().

Definition at line 51 of file CSync.cpp.

References ASSAPI, and m_hEvent.

Referenced by AxPipe::CThreadSync::WorkSignal(), and AxPipe::CThreadSync::WorkWait().


The documentation for this class was generated from the following files:
Generated on Mon Feb 2 13:19:29 2004 for AxPipe by doxygen 1.3.5