It hangs on Windows; and will eventually hang everywhere if you add any useful code to the while loops.
I asked why it deadlocks. You are saying "it hangs. End of."
Well, there you go. This is the difference between users and experts. The difference between playing and knowing.
In reply to Re^15: Threads sharing global variable
by Anonymous Monk
in thread Threads sharing global variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |