Reputation: 9377
Exactly how do the threadpool in TPL work? Several blogs says that it works like:
However, the book Concurrent Programming on Windows by Joe Duffy, says that it works like:
Who's right?
Upvotes: 0
Views: 1164
Reputation: 6451
The blogs seem to be correct in this case;
it first looks at the head of its local queue, then in the global queue, and then in the local queues of other threads.
Source: MSDN, see "Work Stealing"
Upvotes: 2