Copyright | (c) 2017 Composewell Technologies |
---|---|
License | BSD-3-Clause |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- module Streamly.Internal.Data.SVar.Type
- module Streamly.Internal.Data.SVar.Worker
- module Streamly.Internal.Data.SVar.Dispatch
- module Streamly.Internal.Data.SVar.Pull
- getYieldRateInfo :: State t m a -> IO (Maybe YieldRateInfo)
- newSVarStats :: IO SVarStats
- newParallelVar :: MonadAsync m => SVarStopStyle -> State t m a -> m (SVar t m a)
- enqueueAhead :: SVar t m a -> IORef ([t m a], Int) -> (RunInIO m, t m a) -> IO ()
- reEnqueueAhead :: SVar t m a -> IORef ([t m a], Int) -> t m a -> IO ()
- queueEmptyAhead :: MonadIO m => IORef ([t m a], Int) -> m Bool
- dequeueAhead :: MonadIO m => IORef ([t m a], Int) -> m (Maybe (t m a, Int))
- data HeapDequeueResult t m a
- dequeueFromHeap :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> IO (HeapDequeueResult t m a)
- dequeueFromHeapSeq :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> Int -> IO (HeapDequeueResult t m a)
- requeueOnHeapTop :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> Entry Int (AheadHeapEntry t m a) -> Int -> IO ()
- updateHeapSeq :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> Int -> IO ()
- withIORef :: IORef a -> (a -> IO b) -> IO b
- heapIsSane :: Maybe Int -> Int -> Bool
- newAheadVar :: MonadAsync m => State t m a -> t m a -> (IORef ([t m a], Int) -> IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> State t m a -> SVar t m a -> Maybe WorkerInfo -> m ()) -> m (SVar t m a)
Documentation
New SVar
getYieldRateInfo :: State t m a -> IO (Maybe YieldRateInfo) Source #
Parallel
newParallelVar :: MonadAsync m => SVarStopStyle -> State t m a -> m (SVar t m a) Source #
Ahead
data HeapDequeueResult t m a Source #
dequeueFromHeap :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> IO (HeapDequeueResult t m a) Source #
dequeueFromHeapSeq :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> Int -> IO (HeapDequeueResult t m a) Source #
requeueOnHeapTop :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> Entry Int (AheadHeapEntry t m a) -> Int -> IO () Source #
updateHeapSeq :: IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> Int -> IO () Source #
newAheadVar :: MonadAsync m => State t m a -> t m a -> (IORef ([t m a], Int) -> IORef (Heap (Entry Int (AheadHeapEntry t m a)), Maybe Int) -> State t m a -> SVar t m a -> Maybe WorkerInfo -> m ()) -> m (SVar t m a) Source #