Safe Haskell | None |
---|
This module provides only the raw primops (and necessary types) for atomic operations.
- casArray# :: MutableArray# RealWorld a -> Int# -> Ticket a -> Ticket a -> State# RealWorld -> (#State# RealWorld, Int#, Ticket a#)
- readForCAS# :: MutVar# RealWorld a -> State# RealWorld -> (#State# RealWorld, Ticket a#)
- casMutVarTicketed# :: MutVar# RealWorld a -> Ticket a -> Ticket a -> State# RealWorld -> (#State# RealWorld, Int#, Ticket a#)
- type Ticket a = Any a
Documentation
casArray# :: MutableArray# RealWorld a -> Int# -> Ticket a -> Ticket a -> State# RealWorld -> (#State# RealWorld, Int#, Ticket a#)Source
Unsafe, machine-level atomic compare and swap on an element within an Array.