immortal-queue: Build a pool of queue-processing worker threads.

[ bsd3, concurrency, library ] [ Propose Tags ]

immortal-queue is a library for build an asynchronous worker pool that processes action from a generic queue. You can use any thread-safe datatype with a push and pop like a TQueue or a persistent database table.

The worker pool is configured by building an ImmortalQueue type, which describes how to push and pop from the queue as well as how to process items and handle errors.

For a simple usage example using a TQueue, see the module documentation. For a more complex example that uses a persistent database as a queue, see Southern Exposure's website code.

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],
Change log
Dependencies async (>=2 && <3), base (>=4.7 && <5), immortal (>=0.2.1 && <1), nats (>=1 && <2) [details]
License BSD-3-Clause
Copyright 2020 Pavan Rikhi
Author Pavan Rikhi
Category Concurrency
Home page
Bug tracker
Source repo head: git clone
Uploaded by lysergia at 2020-03-03T19:15:31Z
Distributions LTSHaskell:, NixOS:, Stackage:
Downloads 880 total (13 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-03-03 [all 1 reports]

Readme for immortal-queue-

[back to package description]

Immortal Queue

immortal-queue Build Status

A Haskell library for building a pool of queue-processing worker threads, leveraging the immortal package.


To use this library, build an ImmortalQueue value describing how to manipulate and process your queue. Then you start start the pool using the processImmortalQueue function and close or kill it with closeImmortalQueue or killImmortalQueue.

For a simple example using a TQueue, please refer to the haddock documentation for the module.

For a more complex example that uses a persistent database as a queue backend, see the Southern Exposure Seed Exchange's Workers module.


You can build the project with stack:

stack build

For development, you can enable fast builds with file-watching, documentation-building, & test-running:

stack test --haddock --fast --file-watch --pedantic

To build & open the documentation, run:

stack haddock --open immortal-queue



The original code for this package was lifted from Southern Exposure Seed Exchange's website.