Compare and Swap

Jasper Potts jasper.potts at hedera.com
Wed Mar 30 21:18:34 UTC 2022


Hi,

I would really like to replace our usage of misc.Unsafe but can’t seem to find a way to do the equivalent of compareAndSwapLong() on a MemorySegment. Today we use off-heap ByteBuffers and Unsafe to do atomic compare and swaps. It works great just sad to have to use Unsafe.

Thanks

Jasper


More information about the panama-dev mailing list