c# - is it acceptable to use ThreadPool in a library? -
Is it acceptable to use Threadpool
in a library?
Because obviously, there may be some unpleasant problems if your library's user is also using Threadpool
( Threadpool
due to a static class That is the condition).
What is the conference?
Yes. I think it is fair to use Threadpool in this library code. Even if the user can use Threadpool, Threadpool is still sufficient to tune.
On the other hand, as a library developer, you should provide flexibility: User Threadpool can choose to use a specific thread (s), or even a third party thread pool Implementation
Comments
Post a Comment