Threads that lock all their shared variables when they start and never release them.
Are you an idiot or a troll? I'm tired of your endless, rude and completely wrong "corrections". Learn to read.
And your version is sh*te! (Hint:locks should be held for as small a scope and for as little time as possible!)
The lock is held no longer in my version than it is in your version[1]. Go read the post again. Specifically, the notes at the bottom. They specifically address your misconceptions.
In reply to Re^4: Threads sharing global variable
by ikegami
in thread Threads sharing global variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |