Quote Originally Posted by Sipher View Post
...but in this code it wouldn't hurt anyone...
But that is where I disagree.
Your code is broken in that it relies on race conditions.
And the fact that it uses a busy loop is unacceptable--at least to me--under any circumstance unless you can prove there is no better way to do it.