Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
:: Hashable k | |
=> Eq k | |
=> Show k | |
=> MonadIO m | |
=> MonadBaseControl IO m stM | |
=> Extractable stM | |
=> TChanRW Write (k, input) | Incoming messages, identified by thread |
-> (TChanRW Read input -> TChanRW Write output -> m ()) | Process to spark in a new thread. When |
-> m (Async (), TChanRW Read (k, output)) |
Segregates concurrently operating threads by some key type k
. Returns the
thread that processes all other threads (this function is non-blocking), and the
channel that dispenses the outputs from each thread.