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.

  1. data ThreadStorageMap a

    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.

  2. 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.

  3. 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.

  4. 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.

  5. getThreadId :: ThreadId -> Word

    thread-utils-context Control.Concurrent.Thread.Storage

    No documentation available.

  6. 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

  7. 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.

  8. 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.

  9. updateOnThread :: MonadIO m => ThreadStorageMap a -> ThreadId -> (Maybe a -> (Maybe a, b)) -> m b

    thread-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.

  10. package thread-utils-finalizers

    Perform finalization for threads. Please see the README on GitHub at https://github.com/iand675/thread-finalizers#readme

Page 732 of many | Previous | Next