@hackage unliftio-messagebox1.0.0

Fast and robust message queues for concurrent processes

Fast and Robust Message Queues for Concurrent Processes

NOTE: To be able to fully view this README, use the web page.

A thin wrapper around a subset of unagi-chan based on unliftio.

The unit tests and benchmarks in this project excercise a subset of unagi-chan, so hopefully the user of this library doesn't have to worry about this.

This project also aims to implicitly verify parts of unagi-chan.

The overall goal is to reduce the risk of live and dead locks and thread starvation, as well as acceptable performance even in massively concurrent programs.

Additionally in

Module Structure

The library is contained in modules with names starting with UnliftIO.MessageBox.

Module Structure

Also the module UnliftIO.MessageBox (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 Test

This is a small application with a 1002 processes, each performing a fix amount of work.

When the work is done, all processes synchronise before starting a new iteration. After each iteration, the memory usage is queried from the GHC runtime statistics. There are 100 iterations like that.

After that all processes are shutdown, and the process starts all over again, 30 times.

In total 3000 iterations.

If memory is leaked it should become visible.

The test program is executated with the +RTS -M400m option that instructs the runtime to limit the available heap to 400MB, so when there is a memory leak, the program would at some point crash with a heap exhaustion error.

Memleak Test Heap Profiling Report

The output is printed into this log file.