timeout: Generalized sleep and timeout functions

[ concurrency, control, library, mit ] [ Propose Tags ] [ Report a vulnerability ]

Generalized sleep and timeout functions


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.0, 0.1.0, 0.1.1
Change log CHANGES.md
Dependencies base (<5), exceptions (>=0.6), mtl, time [details]
Tested with ghc >=7.6 && <7.7
License MIT
Copyright 2014 Fedor Gogolev 2013 Selectel
Author Fedor Gogolev <knsd@knsd.net>
Maintainer knsd@knsd.net
Category Concurrency, Control
Home page https://github.com/lambda-llama/timeout
Bug tracker https://github.com/lambda-llama/timeout/issues
Source repo head: git clone https://github.com/lambda-llama/timeout
Uploaded by FedorGogolev at 2014-08-02T12:36:51Z
Distributions
Reverse Dependencies 2 direct, 1 indirect [details]
Downloads 3002 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]

Readme for timeout-0.1.1

[back to package description]

timeout Build Status Build Status

Generalized sleep and timeout functions.

Example

module Main where

import Control.Timeout (timeout, sleep)

main :: IO ()
main = do
    timeout 1 $ sleep 2  -- Will return IO Nothing
    timeout 2 $ sleep 1  -- Will return IO (Just ())
    return ()