@hackage streaming-concurrency0.3.1.2
Concurrency support for the streaming ecosystem
Installation
Tested Compilers
Dependencies (8)
- base >=4 && <5
- exceptions >=0.6 && <0.11
- lifted-async >=0.9.3 && <0.111
- monad-control >=1 && <2
- stm >=2.4 && <3
- streaming >=0.1.4.0 && <0.3 Show all…
Dependents (1)
@hackage/streaming-process
streaming-concurrency
Concurrency for the streaming ecosystem
There are two primary higher-level use-cases for this library:
-
Merge multiple
Streams together. -
A conceptual
Stream-based equivalent toparMap(albeit utilising concurrency rather than true parallelism).
However, low-level functions are also exposed so you can construct
your own methods of concurrently using Streams (and there are also
non-Stream-specific functions if you wish to use it with other data
types).
Conceptually, the approach taken is to consider a typical
correspondence system with an in-basket/tray for receiving messages
for others, and an out-basket/tray to be later dealt with. Inputs are
thus provided into the InBasket and removed once available from the
OutBasket.
Thanks and recognition
The code here is heavily based upon -- and borrows the underlying
Buffer code from -- Gabriel Gonzalez's pipes-concurrency. It
differs from it primarily in being more bracket-oriented rather than
providing a spawn primitive, thus not requiring explicit garbage
collection.
Another main difference is that the naming of the input and output
types has been switched around: pipes-concurrency seems to consider
them from the point of view of the supplying/consuming Pipes,
whereas here they are considered from the point of view of the
Buffer itself.