The purescript-coroutines library provides some base functions for working with coroutines. Using joinMany
, you can join multiple Consumer
s so they can listen to a Producer
.
Some open questions that I'm still working on...
- Would you ever need to join this many consumers? Is this a design pattern you should entertain?
- Do sequential actions in the Aff monad naturally lead to "RangeError: Maximum call stack size exceeded" and is there a way to avoid it?