SemaphoreSlim.Release 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
释放 SemaphoreSlim 对象。
重载
| 名称 | 说明 |
|---|---|
| Release() |
释放对象 SemaphoreSlim 一次。 |
| Release(Int32) |
SemaphoreSlim释放指定次数的对象。 |
Release()
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
释放对象 SemaphoreSlim 一次。
public:
int Release();
public int Release();
member this.Release : unit -> int
Public Function Release () As Integer
返回
上一个 SemaphoreSlim计数 。
例外
当前实例已释放。
已 SemaphoreSlim 达到其最大大小。
注解
对 Release() 方法的调用将属性递增 CurrentCount 一个。 如果在调用此方法之前此属性的值 CurrentCount 为零,则该方法还允许调用或方法阻止的 Wait 一个线程或 WaitAsync 任务进入信号灯。
另请参阅
适用于
Release(Int32)
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
- Source:
- SemaphoreSlim.cs
SemaphoreSlim释放指定次数的对象。
public:
int Release(int releaseCount);
public int Release(int releaseCount);
member this.Release : int -> int
Public Function Release (releaseCount As Integer) As Integer
参数
- releaseCount
- Int32
退出信号灯的次数。
返回
上一个 SemaphoreSlim计数 。
例外
当前实例已释放。
releaseCount 小于 1。
已 SemaphoreSlim 达到其最大大小。
注解
对Release(Int32)方法的CurrentCount调用将属性递增。releaseCount
CurrentCount如果在调用此方法之前属性值为零,该方法还允许releaseCount调用Wait或方法阻止线程或WaitAsync任务进入信号灯。