cats-effect
cats-effect copied to clipboard
Remove TODO in `IOFiber.readBarrier()`
trafficstars
#4320 benchmark reference:
withBarrier (volatile) : ~5.2M ops/s
withoutBarrier (plain) : ~5.3M ops/s (unsafe for fibers)
javaFullFence : ~800K ops/s (overkill)
optimizing further makes no sense because VarHandle/Unsafe will introduce complexity for negligible gain. Plain reads break correctness. Volatile is just perfect.