Skip to content

Commit 4c13585

Browse files
committed
修改命名
1 parent 4cb2f04 commit 4c13585

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

AsyncWorkerCollection/AsyncQueue.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public async Task<T> DequeueAsync(CancellationToken cancellationToken = default)
7878
return default;
7979
}
8080

81+
/// <summary>
82+
/// 主要用来释放锁,让 DequeueAsync 方法返回,解决因为锁让此对象内存不释放
83+
/// </summary>
8184
public void Dispose()
8285
{
8386
// 当释放的时候,将通过 _queue 的 Clear 清空内容,而通过 _semaphoreSlim 的释放让 DequeueAsync 释放锁

0 commit comments

Comments
 (0)