Skip to content

A library for process pools coupled with asynchronous message queues

License

Notifications You must be signed in to change notification settings

sheyll/rio-process-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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.

About

A library for process pools coupled with asynchronous message queues

Resources

License

Stars

Watchers

Forks

Packages

No packages published