Module

NativeRef

#new

new :: forall a. a -> Effect (Ref a)

Create a new ref containing value 'a'

#read

read :: forall a. Ref a -> Effect a

#write

write :: forall a. a -> Ref a -> Effect Unit

Writes a value to the reference Note: This will block if the reference is presently locked

#modify

modify :: forall a. (a -> a) -> Ref a -> Effect a

#Ref

data Ref t0

Handle to a thread-safe reference to a shared value

Modules