A library for process pools coupled with asynchronous message queues.
Please see the README on GitHub at https://github.com/sheyll/rio-process-pool#readme
Concurrent Process Pools
NOTE: To be able to fully view this README, use the GitHub Pages Version.
A process pool processes incoming messages and dispatches them to worker threads.
Worker threads are started and stopped and each has their own message box, that decouples from the processes for asynchronous processing.
The main architectural advantages are the usage of multiple CPU cores and the seperation of address spaces of each worker.
This is clearly more low-level than STM in that regard, that STM offers shared memory concurrency.
This is also just a small library built on top of unliftio-messagebox.
Module Structure
The library is contained in modules with names starting with RIO.ProcessPool.
Also the module RIO.ProcessPool
(API docs)(Hackage) exposes the API, and can be used to import everything.
The full documentation is either on this page(build log) or on Hackage.
Benchmarks
Unit Tests
Heap Profiling
Time Profiling
Memory Leak Tests
Benchmark memory usage of a very simple Pool
example.
A single dispatcher process sends a Start
, some Work
and a Stop
message to a Pool
that spawns and dispatches the message
This is a rather long running test, executed with capped memory so that when space is leaked, it will crash the benchmark.
The output is printed into this log file.