-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Some extra kit for Chans -- -- Some extra kit for Chans @package chan @version 0.0.2 module Control.Concurrent.STM.TChan.Extra type DiffNanosec = Int -- | Note: In this model, even though we are using STM, a write to the -- outgoing channel does not imply a transactional write to the output -- channel; they are separated between a run IO layer, which means we -- cannot atomically debounce or interleave the system (because that -- depends on real-world time). debounceStatic :: DiffNanosec -> TChan a -> IO (TChan a, Async ()) throttleStatic :: DiffNanosec -> TChan a -> IO (TChan a, Async ()) intersperseStatic :: DiffNanosec -> IO a -> TChan a -> IO (TChan a, Async (), Async ()) module Control.Concurrent.Chan.Extra type DiffNanosec = Int debounceStatic :: DiffNanosec -> Chan a -> IO (Chan a, Async ()) -- | Like debounce, but lossless throttleStatic :: DiffNanosec -> Chan a -> IO (Chan a, Async ()) intersperseStatic :: DiffNanosec -> IO a -> Chan a -> IO (Chan a, Async (), Async ())