base-4.8.0.0: Basic libraries

Copyright | (c) The University of Glasgow, 1994-2002
License | see libraries/base/LICENSE
Maintainer | cvs-ghc@haskell.org
Stability | internal
Portability | non-portable (GHC extensions)
Safe Haskell | Trustworthy
Language | Haskell2010

GHC.Conc.Windows

Contents

- Waiting
- Miscellaneous

Description

Windows I/O manager

Synopsis

- ensureIOManagerIsRunning :: IO ()
- threadDelay :: Int -> IO ()
- registerDelay :: Int -> IO (TVar Bool)
- asyncRead :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- asyncWrite :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)
- asyncDoProc :: FunPtr (Ptr a -> IO Int) -> Ptr a -> IO Int
- asyncReadBA :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
- asyncWriteBA :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)
- data ConsoleEvent
  - = ControlC
  - | Break
  - | Close
  - | Logoff
  - | Shutdown
- win32ConsoleHandler :: MVar (ConsoleEvent -> IO ())
- toWin32ConsoleEvent :: (Eq a, Num a) => a -> Maybe ConsoleEvent

# Documentation

ensureIOManagerIsRunning :: IO ()

# Waiting

threadDelay :: Int -> IO ()

Suspends the current thread for a given number of microseconds (GHC only).

There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run earlier than specified.

registerDelay :: Int -> IO (TVar Bool)

Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.

# Miscellaneous

asyncRead :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)

asyncWrite :: Int -> Int -> Int -> Ptr a -> IO (Int, Int)

asyncDoProc :: FunPtr (Ptr a -> IO Int) -> Ptr a -> IO Int

asyncReadBA :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)

asyncWriteBA :: Int -> Int -> Int -> Int -> MutableByteArray# RealWorld -> IO (Int, Int)

data ConsoleEvent

Constructors

ControlC |
Break |
Close |
Logoff |
Shutdown |

Instances

Enum ConsoleEvent |
Eq ConsoleEvent |
Ord ConsoleEvent |
Read ConsoleEvent |
Show ConsoleEvent |

win32ConsoleHandler :: MVar (ConsoleEvent -> IO ())

toWin32ConsoleEvent :: (Eq a, Num a) => a -> Maybe ConsoleEvent