in reply to Re^13: Threads sharing global variable
in thread Threads sharing global variable

The code you posted, is similarly at the mercy of the underlying signaling mechanism.

My code doesn't hang in its posted form anywhere.

And add long running code into the processing loops of any or all of the threads and all threads will always be able to make forward progress.

My code works! As posted, and during evolution to realistic scenarios. By design!


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.