Do I need to use explicit locks to synchronize access to shared variables?
necessary? No. A good idea? Yes. Low-block methods are very difficult to get right and rarely justified. Remember that blocking is slow when disputed; if your locks are disputed, fix the problem that causes them to be disputed, rather than moving to a low-lock solution.
- , .
.
. , , .
, : . , - , ?
. # , . - . , , , . , , , . , . , , . Atomity , , , .
: , . , . , , , , , , ..