concurrent-resource-map alternatives and similar packages
Based on the "concurrent" category.
Alternatively, view concurrent-resource-map alternatives based on common mentions on social networks and blogs.
Do you think we are missing an alternative of concurrent-resource-map or a related project?
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.