threads::shared locks are advisory (see the docs). You have to test for it in your TryToReadLockVar thread rather than just altering it regardless of the lock.
In reply to Re: threads::shared: lock a VARIABLE
by hippo
in thread threads::shared: lock a VARIABLE
by freakcoco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |