mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
10 lines
268 B
Java
10 lines
268 B
Java
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
|
|
|
|
class Atomics {
|
|
private volatile long num;
|
|
|
|
public void set(long n) {
|
|
AtomicLongFieldUpdater<Atomics> updater = AtomicLongFieldUpdater.newUpdater(Atomics.class, "num");
|
|
updater.set(this, n);
|
|
}
|
|
} |