employer cover photo
employer logo
employer logo

Thermo Fisher Scientific

Engaged employer

Thermo Fisher Scientific interview question

What is a thread pool? How does it work?

Interview Answer

Anonymous

9 Jul 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().