rio-process-pool: A library for process pools coupled with asynchronous message queues

[ bsd2, concurrency, library, program ] [ Propose Tags ]

Flags

Manual Flags

NameDescriptionDefault
development

Configure a development version, i.e. -fprof-auto and -Werror

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.0.1
Dependencies async (>=2 && <3), base (>=4.14 && <5), containers (>=0.5.8 && <0.7), data-default (>=0.7 && <0.8), hashable, mtl, QuickCheck, rio, rio-process-pool, text, unliftio, unliftio-messagebox (>=2.0.0 && <3) [details]
License BSD-2-Clause
Copyright Copyright Sven Heyll
Author Sven Heyll
Maintainer sven.heyll@gmail.com
Category Concurrency
Home page https://github.com/sheyll/rio-process-pool#readme
Bug tracker https://github.com/sheyll/rio-process-pool/issues
Source repo head: git clone https://github.com/sheyll/rio-process-pool
Uploaded by SvenHeyll at 2021-02-17T20:36:21Z
Distributions
Executables rio-process-pool-memleak-test
Downloads 226 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-02-17 [all 1 reports]

Readme for rio-process-pool-1.0.0

[back to package description]

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.

Module Structure

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

Test Heap Profiling Report

Time Profiling

Test Profiling Report

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

Like the previous benchmark this is a rather long running test executed with capped memory so that when space is leaked, it will crash the benchmark.

Pool Memleak Test Heap Profiling Report

The output is printed into this log file.