broadcast-chan-0.1.1: Closable, fair, single-wakeup channel type that avoids 0 reader space leaks.

Copyright(C) 2014-2017 Merijn Verstraaten
LicenseBSD-style (see the file LICENSE)
MaintainerMerijn Verstraaten <merijn@inconsistent.nl>
Stabilityexperimental
Portabilityhaha
Safe HaskellSafe
LanguageHaskell2010

BroadcastChan.Throw

Description

Re-export of Broadcast that replaces BroadcastChan.writeBChan and BroadcastChan.readBChan with versions that throw an exception, rather than returning results that the user has to inspect to check for success.

Synopsis

Documentation

readBChan :: BroadcastChan Out a -> IO a Source #

Like readBChan, but throws a ReadFailed exception when reading from a closed and empty BroadcastChan.

writeBChan :: BroadcastChan In a -> a -> IO () Source #

Like writeBChan, but throws a WriteFailed exception when writing to closed BroadcastChan.