Volatile не работает
public class Tester{ static volatile StringBuilder sb = new StringBuilder(""); public static void main(String[] args) throws Exception, Throwable { Tester t = new Tester(); Execut…
public class Tester{ static volatile StringBuilder sb = new StringBuilder(""); public static void main(String[] args) throws Exception, Throwable { Tester t = new Tester(); Execut…
Здравствуйте. Такой вопрос: имеется инстанс синглтона класса SomeClass. Нужно ли помечать volatile коллекцию clients? Нужно ли помечать volatile переменные внутри класса Client? p…