【发布时间】:2013-06-25 00:29:31
【问题描述】:
http://msdn.microsoft.com/en-us/library/dd267312.aspx 的 MSDN 评论指出...
"BlockingCollection 的默认集合类型是 ConcurrentQueue"
这是否意味着当我在集合上运行“GetConsumingEnumerable()”时,拉出的项目正在从队列中出列,使用后将被标记为 GC?
也就是说……在下面的sn-p中,
foreach (var item in collection.GetConsumingEnumerable())
{
//do something with item
}
循环迭代后项目会发生什么?
【问题讨论】:
-
你尝试的时候发生了什么?
标签: c# collections blockingcollection