resource-registry: Track allocated resources

[ apache, control, library ] [ Propose Tags ] [ Report a vulnerability ]

When the scope of a bracket doesn't enclose all uses of the resource, a ResourceRegistry can be used instead to capture the lifetime of those resources.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.14 && <4.21), bimap (>=0.5 && <0.6), containers (>=0.6 && <0.8), io-classes (>=1.5 && <1.6), mtl (>=2.2 && <2.4), nothunks (>=0.2 && <0.3), strict-stm (>=1.5 && <1.6) [details]
Tested with ghc ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10
License Apache-2.0[multiple license files]
Copyright 2019-2023 Input Output Global Inc (IOG) 2023-2024 INTERSECT
Author IOG Engineering Team
Maintainer operations@iohk.io
Category Control
Bug tracker https://github.com/IntersectMBO/io-classes-extra/issues
Source repo head: git clone https://github.com/IntersectMBO/io-classes-extra(resource-registry)
this: git clone https://github.com/IntersectMBO/io-classes-extra(tag resource-registry-0.1.0.0)(resource-registry)
Uploaded by IOHK at 2024-10-22T14:26:27Z
Distributions
Downloads 53 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for resource-registry-0.1.0.0

[back to package description]

resource-registry

In some cases, the lifetime of a resource is not suitable for CPS and hence can't use bracket-like functions, for example, the resource might be tracked inside some other data structure. In this case, the container data structure can be allocated in a resource registry together with the resources so that an exception will deallocate the resources in a proper order.