在ThreadPool.QueueUserWorkItem最大排队元素 [英] Maximum queued elements in ThreadPool.QueueUserWorkItem

查看:540
本文介绍了在ThreadPool.QueueUserWorkItem最大排队元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设置了​​最大线程10。然后我说22000的任务使用ThreadPool.QueueUserWorkItem。 它很可能不是所有的22000任务正在运行的程序之后完成。是否有限制多少任务可以排队等待缴费的主题?

I set the max thread to 10. Then I added 22000 task using ThreadPool.QueueUserWorkItem. It is very likely that not all the 22000 task was completed after running the program. Is there a limitation how many task can be queued for avaiable threads?

推荐答案

队列中有没有实际的限制但池本身不会超过64等待句柄,即总线程活跃。

The queue has no practical limit however the pool itself will not exceed 64 wait handles, ie total threads active.

这篇关于在ThreadPool.QueueUserWorkItem最大排队元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆