concurrent-resource-map: Concurrent resource map

[ bsd3, data, library ] [ Propose Tags ]

Please see the README on GitHub at

[Skip to Readme]
Versions [faq],
Change log
Dependencies base [details]
License BSD-3-Clause
Copyright 2020 Mateusz Kowalczyk
Author Mateusz Kowalczyk
Category Data
Home page
Bug tracker
Source repo head: git clone
Uploaded by MateuszKowalczyk at 2020-03-18T03:24:32Z
Distributions NixOS:
Downloads 333 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-03-18 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for concurrent-resource-map-

[back to package description]

concurrent-resource-map Build Status

User-counted resource map with automatic resource collection, aimed to be used in concurrent setting.

Consider having some sort of resource that you need properly initialised and cleaned up but only once and only for as long as there are interested users (threads). Further, instead of only a single resource, you want a collection of such resources, keyed on some value.

This package implements a simple bracket-based scheme that manipulates a resource map by counting number of initalisations and clean-ups: if it detects that the cleanup is from the last user, it removes the resource from the map all together. See the code/hackage for documentation.