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

Safe HaskellNone

System.Timeout.Control

Description

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

Synopsis

Documentation

runTimeoutSource

Arguments

:: (Functor m, 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

updateTimeoutSource

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