VarHandle.getAndAdd path via MethodHandles.byteBufferViewVarHandle(LongArray::class.java, ByteOrder.nativeOrder()). VarHandle provides atomic read-modify-write directly on a DirectByteBuffer without crossing the JNI boundary.
object GlobalLastUpdate
get
()
|
Read the current global lastUpdate version directly from shared memory (no JNI).
Signature
fun get(): ULong Returns ULong |
incAndGet
()
|
Atomically increment the global lastUpdate counter and return the new value.
Signature
fun incAndGet(): ULong Returns ULong |