Broadcast channel type that avoids 0 reader space leaks.

Version on this page:0.1.1
LTS Haskell 12.10:0.1.1
Stackage Nightly 2018-09-18:0.1.1
Latest on Hackage:0.1.1

See all snapshots broadcast-chan appears in

BSD3 licensed by Merijn Verstraaten
Maintained by Merijn Verstraaten

Module documentation for 0.1.1

A variation of Control.Concurrent.Chan from base, which allows to the easy creation of broadcast channels without the space-leaks that may arise from using Control.Concurrent.Chan.dupChan. The Control.Concurrent.Chan.Chan type from Control.Concurrent.Chan consists of both a read and write end. This presents a problem when one wants to have a broadcast channel that, at times, has zero listeners. To write to a Control.Concurrent.Chan.Chan there must always be a read end and this read end will hold ALL messages alive until read. The simple solution applied in this module is to separate read and write ends. As a result, any messages written to the write end can be immediately garbage collected if there are no active read ends, avoding space leaks.

Depends on 1 package:
Used by 1 package:
comments powered byDisqus