Exactly how do the threadpool in TPL work? Several blogs says that it works like:
- The thread first checks its local queue
- The thread then checks the global queue
- And at last the thread checks the surrounding local queues
However, the book Concurrent Programming on Windows by Joe Duffy, says that it works like:
- The thread first checks its local queue
- The thread then checks the surrounding local queues
- And at last the thread checks the global queue
Who’s right?
The blogs seem to be correct in this case;
Source: MSDN, see “Work Stealing”