Let*_*man 5 c# convention threadpool
ThreadPool在图书馆使用是否可以接受?
因为如果您的图书馆的用户ThreadPool也在使用这显然可能会导致一些不愉快的问题(ThreadPool当然,由于是静态课程).
惯例是什么?
是的。我认为在库代码中使用 ThreadPool 是合适的。即使用户可能在外部使用ThreadPool,ThreadPool仍然足以自我调整。
另一方面,作为库开发人员,您应该提供灵活性:用户可以选择使用 ThreadPool、特定线程,甚至是第 3 方线程池实现。
| 归档时间: |
|
| 查看次数: |
302 次 |
| 最近记录: |