3 ms·
One thing that stands out is the article's description of a free (non-busy) thread in a thread pool as "blocked." This is IMHO a misuse of the term--in normal
by sk5t 9y ago
One thing that stands out is the article's description of a free (non-busy) thread in a thread pool as "blocked." This is IMHO a misuse of the term--in normal usage, a blocked thread is one that is waiting for a call to complete, whether that's IO, computation, trying to add an item to a full bounded queue configured to make its caller wait rather than fail, etc.
- teraflop 9y agoBut you're drawing a distinction where none exists. When a thread in a thread pool is "free", what it's doing is waiting for the next item of work to arrive -- and in implementation terms, that means the thread is blocked in a "take" operation on a currently-empty work queue. So it's totally correct to use the term "blocked" in that situation.
- sk5t 9y agoIt's a free resource in a pool, probably in interruptible wait() or poll(), but don't you think this is an implementation detail and separate topic of discussion from a thread carrying out program logic and stuck on, say, uninterruptible IO?