Control.Concurrent.Thread.Utils

MissingH-1.4.1.0: Large utility library

Copyright | Copyright (C) 2004-2011 John Goerzen
License | BSD3
Maintainer | John Goerzen <jgoerzen@complete.org>
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Control.Concurrent.Thread.Utils

Contents

- I/O utilities

Description

This module provides various helpful utilities for dealing with threads.

Written by John Goerzen, jgoerzen@complete.org

Synopsis

- runInThread :: IO a -> (a -> IO b) -> IO ThreadId

# I/O utilities

runInThread :: IO a -> (a -> IO b) -> IO ThreadId #

Takes a IO action and a function. The IO action will be called in a separate thread. When it is completed, the specified function is called with its result. This is a simple way of doing callbacks.