The Old New Thing

My, those threads start up really fast nowadays

Here's a little puzzle inspired by an actual bug: Can the assertion at the start of ever fire? Naturally, the answer is Yes, otherwise it wouldn't be a very interesting article. The assertion can fire if the worker thread starts running before the call the returns. In that case, the caller hasn't yet received the handle or ID of the ...