RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::Threading::Event Class Reference

表示线程同步事件 More...

Inheritance diagram for System::Threading::Event:
System::Threading::WaitHandle

Public Member Functions

 Event (EventType eType, bool bInitialState, const String &szName=Nothing)
 初始化 Event 类的新实例 More...
 
LONG SetSignal ()
 设置事件信号 More...
 
void Clear ()
 清除事件信号 More...
 
LONG Pulse ()
 将指定的事件设为发出信号状态 如果是一个人工重设事件, 正在等候事件的、被挂起的所有线程都会进入活动状态, 函数随后将事件设回未发信号状态, 并返回. 如果是一个自动重设事件, 则正在等候事件的、被挂起的单个线程会进入活动状态, 事件随后设回未发信号状态, 并且函数返回 More...
 
- Public Member Functions inherited from System::Threading::WaitHandle
WaitStatus WaitOne (DWORD millisecondsTimeout=INFINITE)
 If a timeout is specified, and the object has not attained a state of signaled when the timeout expires, then the wait is automatically satisfied. An INFINITE timeout will never expire. If an explicit timeout value of zero is specified, then no wait occurs if the wait cannot be satisfied immediately. More...
 

Static Public Member Functions

static EventOpenExisting (const String &)
 如果它已经存在,打开指定的命名 Event More...
 
- Static Public Member Functions inherited from System::Threading::WaitHandle
static WaitStatus Wait (ULONG nCount, HANDLE *pHandles, bool bWaitAll, bool bAlertable, DWORD millisecondsTimeout)
 等待指定数组中的任一或者全部元素收到信号,使用 32 位带符号整数指定时间间隔 More...
 
static WaitStatus WaitOne (HANDLE handle, bool bAlertable, DWORD millisecondsTimeout)
 阻止当前线程,直到当前收到信号,同时使用 32 位带符号整数指定时间间隔 More...
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 
- Public Attributes inherited from System::Threading::WaitHandle
HANDLE Handle
 Gets the native operating system handle More...
 

Additional Inherited Members

- Protected Attributes inherited from System::Threading::WaitHandle
RLIB_OBJECT_ATTRIBUTES m_obj
 
RLIB_UNICODE_STRING m_name
 

Detailed Description

表示线程同步事件

Constructor & Destructor Documentation

Event::Event ( EventType  eType,
bool  bInitialState,
const String szName = Nothing 
)

初始化 Event 类的新实例

Parameters
InitialStateThe initial state of the event object

Member Function Documentation

void Event::Clear ( )

清除事件信号

Event * Event::OpenExisting ( const String szName)
static

如果它已经存在,打开指定的命名 Event

LONG Event::Pulse ( )

将指定的事件设为发出信号状态 如果是一个人工重设事件, 正在等候事件的、被挂起的所有线程都会进入活动状态, 函数随后将事件设回未发信号状态, 并返回. 如果是一个自动重设事件, 则正在等候事件的、被挂起的单个线程会进入活动状态, 事件随后设回未发信号状态, 并且函数返回

Returns
State of Event Object before function call
LONG Event::SetSignal ( )

设置事件信号

Returns
State of Event Object before function call

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