3 ms·
Not only is it not enough, using volatile for locking primitives is a bad idea and should not be done. It slows down the program with no benefits. A correct mu
by jjnoakes 10y ago
Not only is it not enough, using volatile for locking primitives is a bad idea and should not be done. It slows down the program with no benefits.
A correct multi-thrraded program is correct with or without volatile, and so removing volatile can only speed things up and should be done.