typed-duration-0.1.1.0: Thread delay and timeout functions with typed arguments

Safe HaskellNone
LanguageHaskell2010

Control.Concurrent.Timeout

Description

Lifted and typed threadDelay and timeout functions.

Synopsis

Documentation

threadDelay :: (MonadBase IO m, ToDuration t) => t -> m () Source #

Examples:

    threadDelay (1 :: Second)
    threadDelay (100 :: Microseconds)
    threadDelay (1 # Second + 50 # Milliseconds)

timeout :: (MonadBaseControl IO m, ToDuration t) => t -> m a -> m (Maybe a) Source #