System::Threading::Semaphore 类
内容
[
隐藏
]Semaphore class
Semaphore implementation. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class Semaphore : public System::Threading::WaitHandle
方法
| 方法 | 描述 |
|---|---|
| Release() | 释放信号量上的锁。 |
| Release(int) | 释放信号量上的多个锁。 |
| virtual Reset() | 将信号量设置为非信号状态。不受支持。 |
| Semaphore(int, int) | RTTI 信息。 |
| Semaphore(int, int, const String&) | 创建具名信号量。 |
| Semaphore(int, int, const String&, bool&) | 创建具名信号量。 |
| virtual Set() | 将信号量设置为已发信号状态。不受支持。 |
| WaitOne() override | 锁定信号量。如果必要,执行无限等待。 |
| WaitOne(int) override | 锁定信号量。如果必要,执行等待。 |
字段
| 字段 | 描述 |
|---|---|
| static WaitTimeout | 特殊值由函数返回;否则返回数组中已发信号对象的索引,如果超时且没有任何信号。 |
另见
- Class WaitHandle
- Namespace System::Threading
- Library Aspose.Font for C++