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

表示一个同步基元, 也可用于进程间同步 More...

Inheritance diagram for System::Threading::Mutex:
System::Threading::WaitHandle

Public Member Functions

 Mutex (bool bOwner=false, const String &szName=Nothing)
 用一个指示调用线程是否应拥有互斥体的初始所属权的布尔值和一个作为互斥体名称的字符串来初始化 Mutex 类的新实例 More...
 
LONG ReleaseMutex ()
 释放 Mutex 一次 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 MutexOpenExisting (const String &)
 如果它已经存在,打开指定的命名 Mutex 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

Mutex::Mutex ( bool  bOwner = false,
const String szName = Nothing 
)

用一个指示调用线程是否应拥有互斥体的初始所属权的布尔值和一个作为互斥体名称的字符串来初始化 Mutex 类的新实例

Member Function Documentation

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

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

LONG Mutex::ReleaseMutex ( )

释放 Mutex 一次

Returns
Internal mutant counter state before call ReleaseMutex

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