concurrent-0

Safe HaskellNone
LanguageHaskell2010

Concurrent.Thread

Synopsis

Documentation

withCapability :: (MonadMask m, MonadPrimIO m) => m a -> m a Source

Pin the current thread to its capability and run a computation.

This lets us use "capability-local" variables and the like.

currentThread :: PrimMonad m => m Int Source

Retrieve the current thread id

currentCapability :: PrimMonad m => m Int Source

Retrieve the current capability id