.Net How to create a custom ThreadPool shared across all the AppDomain of a process?

前端 未结 2 529
天命终不由人
天命终不由人 2021-02-10 15:38

I made a custom ThreadPool optimized for my specific needs. However, when there are multiple AppDomains in the process, the CLR ThreadPool is able to be shared across all the Ap

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-10 16:34

    After thinking more about it, it's probably a bad idea to try to reimplement a process wide ThreadPool, the CLR ThreadPool is already optimized for this.

    For my case, I wanted more flexibility to be able to prioritize work items queued into the pool, this can be done with a layer built on top of the existing CLR ThreadPool.

提交回复
热议问题