primal-0.1.0.0: Primeval world of Haskell.

Copyright(c) Alexey Kuleshevich 2020
LicenseBSD3
MaintainerAlexey Kuleshevich <alexey@kuleshevi.ch>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Control.Prim.Concurrent

Description

 
Synopsis

Documentation

spark :: MonadPrim s m => a -> m a Source #

runSparks :: MonadPrim s m => m () Source #

delay :: MonadPrim s m => Int -> m () Source #

Wrapper for delay#. Sleep specified number of microseconds. Not designed for threaded runtime: Errors when compiled with -threaded

waitRead :: MonadPrim s m => Fd -> m () Source #

Wrapper for waitRead#. Block and wait for input to become available on the Fd. Not designed for threaded runtime: Errors when compiled with -threaded

waitWrite :: MonadPrim s m => Fd -> m () Source #

Wrapper for waitWrite#. Block and wait until output is possible on the Fd. Not designed for threaded runtime: Errors when compiled with -threaded

fork :: MonadPrim RW m => m () -> m ThreadId Source #

Wrapper around fork#. Unlike forkIO it does not install any exception handlers on the action, so you need make sure to do it yourself.

forkOn :: MonadPrim RW m => Int -> m () -> m ThreadId Source #

Wrapper around forkOn#. Unlike forkOn it does not install any exception handlers on the action, so you need make sure to do it yourself.

killThread :: MonadPrim RW m => ThreadId -> m () Source #

Wrapper around killThread#, which throws ThreadKilled exception in the target thread. Use throwTo if you want a different exception to be thrown.

yield :: MonadPrim RW m => m () Source #

Wrapper around yield#.

labelThread :: MonadPrim RW m => ThreadId -> Ptr a -> m () Source #

Pointer should refer to UTF8 encoded string of bytes

threadIdToCInt :: ThreadId -> CInt Source #

Something that is not available in base. Convert a ThreadId to a regular integral type.

Since: 0.0.0