polysemy-conc-0.3.0.0: Polysemy Effects for Concurrency
Safe HaskellNone
LanguageHaskell2010

Polysemy.Conc.Interpreter.Queue.TBM

Description

 
Synopsis

Documentation

interpretQueueTBMWith :: forall d r. Members [Race, Embed IO] r => TBMQueue d -> InterpreterFor (Queue d) r Source #

Interpret Queue with a TBMQueue.

This variant expects an allocated queue as an argument.

withTBMQueue :: forall d r a. Members [Resource, Embed IO] r => Int -> (TBMQueue d -> Sem r a) -> Sem r a Source #

interpretQueueTBM Source #

Arguments

:: forall d r. Members [Resource, Race, Embed IO] r 
=> Int

Buffer size

-> InterpreterFor (Queue d) r 

Interpret Queue with a TBMQueue.