Adds a finalizer to the finalizers associated with this scope.
Adds a finalizer to the finalizers associated with this scope. If the finalizers associated with this scope have already been run this finalizer will be run immediately.
The finalizer returned from this method will remove the original finalizer from the map and run it.
Adds a finalizer to the finalizers associated with this scope.
Adds a finalizer to the finalizers associated with this scope. If the scope is still open, a Key will be returned. This is an opaque identifier that can be used to activate this finalizer and remove it from the map. from the map. If the scope has been closed, the finalizer will be executed immediately (with the Exit value with which the scope has ended) and no Key will be returned.
Retrieves the finalizer associated with this key.
Runs the specified finalizer and removes it from the finalizers associated with this scope.
Runs the finalizers associated with this scope using the specified execution strategy.
Runs the finalizers associated with this scope using the specified execution strategy. After this action finishes, any finalizers added to this scope will be run immediately.
Removes the finalizer associated with this key and returns it.
Replaces the finalizer associated with this key and returns it.
Replaces the finalizer associated with this key and returns it. If the finalizers associated with this scope have already been run this finalizer will be run immediately.
A
ReleaseMap
represents the finalizers associated with a scope.The design of
ReleaseMap
is inspired by ResourceT, written by Michael Snoyman @snoyberg. (https://github.com/snoyberg/conduit/blob/master/resourcet/Control/Monad/Trans/Resource/Internal.hs)