timeout-control-0.2: Updatable timeouts as a Monad transformer

Safe HaskellNone
LanguageHaskell2010

System.Timeout.Control

Description

Add updatable timeout functionality to a Monad transformer stack layered on IO

Synopsis

Documentation

runTimeout Source

Arguments

:: (MonadBaseControl IO m, MonadIO m) 
=> Microseconds

Microseconds in the future

-> Timeout m a

Timeout action to run

-> m (Either TimeoutException a)

The result or a TimeoutException

Run the timeout transformer

updateTimeout Source

Arguments

:: MonadIO m 
=> Microseconds

Microseconds in the future

-> Timeout m () 

Reset the timeout duration

newtype Microseconds Source

A duration measured in microseconds

Constructors

Microseconds Int