mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
10 lines
309 B
Java
10 lines
309 B
Java
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
|
|
|
|
class Atomics {
|
|
private volatile String str;
|
|
|
|
public void set(String s) {
|
|
AtomicReferenceFieldUpdater<Atomics, String> updater = AtomicReferenceFieldUpdater.newUpdater(Atomics.class, String.class, "str");
|
|
updater.set(this, s);
|
|
}
|
|
} |