class Managed[A]
managed(eff): eff run in a new scope on entering, its value
bound by as, and the scope closed when the block ends (see
CloseableScope.__enter__). Each one is entered once.
Functions#
__init__#
__init__(eff, context) -> None| Parameter | Type | Description |
|---|---|---|
eff | Effect[A, Any, Any] | |
context | Context[Any] |
def __init__(self, eff: Effect[A, Any, Any], context: Context[Any]) -> None:
self._eff = eff
self._context = context
self._scope: CloseableScope | None = None
# Held from the first entry on, so of threads entering at once exactly one does.
self._claim = threading.Lock()