stm-orelse-io-0.1: Choose between the return value of an STM operation and an IO action.

Safe HaskellSafe-Inferred

Control.Concurrent.MVarIO

Description

Perform an IO action, and place its result in an MVar. See also Control.Concurrent.STM.TMVarIO for a TMVar version.

Synopsis

Documentation

run :: IO a -> IO (MVar a)Source

run action returns an MVar immediately. The result of action will be placed in said MVar. If the MVar is full when action completes, the return value is lost (the action does not wait for an empty MVar).