Safe Haskell | Safe-Inferred |
---|
- strictAtomicModifyIORef :: IORef a -> (a -> a) -> IO ()
Documentation
strictAtomicModifyIORef :: IORef a -> (a -> a) -> IO ()Source
Strict version of atomicModifyIORef
.
When modifying the IORef, calculation is delayed.
So, modification is quick and CAS would success.
After modification, calculation is forced.
So, no space leak.