Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bindings to the POSIX threads library.
- create :: IO (Ptr a) -> IO ThreadId
- create_ :: IO () -> IO ThreadId
- createWithAttributes :: AttributesMonoid -> IO (Ptr a) -> IO ThreadId
- createWithAttributes_ :: AttributesMonoid -> IO () -> IO ThreadId
- exit :: Ptr a -> IO ()
- exit_ :: IO ()
- cancel :: ThreadId -> IO ()
- join :: ThreadId -> IO (Ptr a)
- detach :: ThreadId -> IO ()
- myThreadId :: IO ThreadId
- data Attributes = Attributes DetachState CSize InheritSched SchedParam SchedPolicy Scope (Ptr ()) CSize
- data AttributesMonoid = AttributesMonoid (First DetachState) (First CSize) (First InheritSched) (First SchedParam) (First SchedPolicy) (First Scope) (First (Ptr ())) (First CSize)
- data Key
- createKey :: FunPtr (Ptr a -> IO ()) -> IO Key
- createKey_ :: IO Key
- deleteKey :: Key -> IO ()
- setSpecific :: Key -> Ptr a -> IO ()
- getSpecific :: Key -> IO (Ptr a)
Threads
:: AttributesMonoid | |
-> IO (Ptr a) | Created thread runs this IO computation. |
-> IO ThreadId |
Create a new thread.
createWithAttributes_ :: AttributesMonoid -> IO () -> IO ThreadId Source #
Like createWithAttributes
, but with an IO
computation that returns
nothing.
myThreadId :: IO ThreadId Source #
Obtain ID of the calling thread.
Attributes
data Attributes Source #
Thread attributes.
Attributes DetachState CSize InheritSched SchedParam SchedPolicy Scope (Ptr ()) CSize |
data AttributesMonoid Source #
Partial set of thread attributes. Think of it as a diff to apply to the default attributes object.
Thread local storage
Opaque objects used to locate thread-specific data.