Hoogle Search
Within LTS Haskell 24.68 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
thread-utils-context Control.Concurrent.Thread.Storage A storage mechanism for values of a type. This structure retains items on per-(green)thread basis, which can be useful in rare cases.
adjustOnThread :: MonadIO m => ThreadStorageMap a -> ThreadId -> (a -> a) -> m ()thread-utils-context Control.Concurrent.Thread.Storage Update the associated value for the specified thread if it is attached.
attachOnThread :: MonadIO m => ThreadStorageMap a -> ThreadId -> a -> m (Maybe a)thread-utils-context Control.Concurrent.Thread.Storage Associate the provided value with the specified thread. This replaces any values already associated with the ThreadId.
detachFromThread :: MonadIO m => ThreadStorageMap a -> ThreadId -> m (Maybe a)thread-utils-context Control.Concurrent.Thread.Storage Disassociate the associated value from the specified thread, returning it if it exists.
getThreadId :: ThreadId -> Wordthread-utils-context Control.Concurrent.Thread.Storage No documentation available.
lookupOnThread :: MonadIO m => ThreadStorageMap a -> ThreadId -> m (Maybe a)thread-utils-context Control.Concurrent.Thread.Storage Retrieve a value if it exists for the specified thread
newThreadStorageMap :: MonadIO m => m (ThreadStorageMap a)thread-utils-context Control.Concurrent.Thread.Storage Create a new thread storage map. The map is striped by thread into 32 sections in order to reduce contention.
purgeDeadThreads :: MonadIO m => ThreadStorageMap a -> m ()thread-utils-context Control.Concurrent.Thread.Storage This should generally not be needed, but may be used to remove values prior to GC-triggered finalizers being run from the ThreadStorageMap for threads that have exited.
updateOnThread :: MonadIO m => ThreadStorageMap a -> ThreadId -> (Maybe a -> (Maybe a, b)) -> m bthread-utils-context Control.Concurrent.Thread.Storage The most general function in this library. Update a ThreadStorageMap on a given thread, with the ability to add or remove values and return some sort of result.
package
thread-utils-finalizers Perform finalization for threads. Please see the README on GitHub at https://github.com/iand675/thread-finalizers#readme