Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
tryReadTQueue :: TQueue a -> STM (Maybe a)distributed-process Control.Distributed.Process.Internal.WeakTQueue A version of readTQueue which does not retry. Instead it returns Nothing if no value is available.
-
distributed-process Control.Distributed.Process.Management Continue executing (i.e., receiving and processing messages).
-
distributed-process Control.Distributed.Process.Management.Internal.Types No documentation available.
-
gi-cairo GI.Cairo.Enums No description available in the introspection data.
module OpenTelemetry.Context.
ThreadLocal Thread-local contexts may be attached as implicit state at a per-Haskell-thread level. This module uses a fair amount of GHC internals to enable performing lookups of context for any threads that are alive. Caution should be taken for consumers of this module to not retain ThreadId references indefinitely, as that could delay cleanup of thread-local state. Thread-local contexts have the following semantics:
- A value attached to a ThreadId will remain alive at least as long as the ThreadId.
- A value may be detached from a ThreadId via detach by the library consumer without detriment.
- No guarantees are made about when a value will be garbage-collected once all references to ThreadId have been dropped. However, this simply means in practice that any unused contexts will cleaned up upon the next garbage collection and may not be actively freed when the program exits.
adjustContextOnThread :: MonadIO m => ThreadId -> (Context -> Context) -> m ()hs-opentelemetry-api OpenTelemetry.Context.ThreadLocal Alter the context If there is not a context associated with the provided thread, the function will be applied to an empty context and the result will be stored
attachContextOnThread :: MonadIO m => ThreadId -> Context -> m (Maybe Context)hs-opentelemetry-api OpenTelemetry.Context.ThreadLocal Store a given Context for the provided ThreadId, returning any context previously stored.
detachContextFromThread :: MonadIO m => ThreadId -> m (Maybe Context)hs-opentelemetry-api OpenTelemetry.Context.ThreadLocal Remove a stored Context for the provided ThreadId, returning any context previously stored. The detach functions don't generally need to be called manually, because finalizers will automatically clean up contexts when a thread has completed and been garbage collected. If you are replacing a context on a long-lived thread by detaching and attaching, use `adjustContext (const newContext)` instead to avoid registering additional finalizer functions to be called on thread exit.
lookupContextOnThread :: MonadIO m => ThreadId -> m (Maybe Context)hs-opentelemetry-api OpenTelemetry.Context.ThreadLocal Retrieve a stored Context for the provided ThreadId, if it exists.
threadContextMap :: ThreadContextMaphs-opentelemetry-api OpenTelemetry.Context.ThreadLocal This is a global variable that is used to store the thread-local context map. It is not intended to be used directly for production purposes, but is exposed for debugging purposes.