由网友(永远的过客)分享简介:这是什么BlockingCollection.Dispose实际上做?What does BlockingCollection.Dispose actually do?推荐答案这使得内部等待处理,以妥善处理。 This allows the internal wait handles to be dispose...
这是什么BlockingCollection.Dispose实际上做?
What does BlockingCollection.Dispose actually do?
推荐答案
这使得内部等待处理,以妥善处理。
This allows the internal wait handles to be disposed of properly.
BlockingCollection< T>
,在内部,使用一对事件等待句柄,这反过来又具有相关联的原生 HANDLE
。
BlockingCollection<T>
, internally, uses a pair of event wait handles, which in turn have an associated native HANDLE
.
具体而言, BlockingCollection&LT; T&GT; .Dispose()
发布这两个把手回操作系统,以最终(通过SemaphoreSlim->的ManualResetEvent)调用本机 CloseHandle的上的两个本地处理方法
实例。
Specifically, BlockingCollection<T>.Dispose()
releases these two handles back to the operating system, by eventually (through SemaphoreSlim->ManualResetEvent) calling the native CloseHandle method on the two native HANDLE
instances.
相关推荐
最新文章