Question d’entretien chez Thermo Fisher Scientific

What is a thread pool? How does it work?

Réponse à la question d'entretien

Utilisateur anonyme

9 juill. 2010

.NET has a static class ThreadPool that manages a pool of background working threads that you can use to call methods asynchronously without having to create(which is expensive), start and stop the threads. You order a thread from the pool with help of ThreadPool.QueueUserWorkItem(YourMethodName). The thread pool is also used behind a scene when you invoke a method asynchronously via YourMethod'sDelegateName.BeginInvoke().