Safe Haskell | None |
---|---|
Language | Haskell2010 |
- withCapability :: (MonadMask m, MonadPrimIO m) => m a -> m a
- currentThread :: PrimMonad m => m Int
- currentCapability :: PrimMonad m => m Int
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