Builds a resource.
Compose a new managed resource that depends on this' managed resource.
Create a new T, and pass it to the given operation (f).
Create a new T, and pass it to the given operation (f). After it completes, the resource is disposed.
Managed[T]
is a resource of typeT
which lifetime is explicitly managed. It is created withmake()
. Composite resources, which lifetimes are managed together, are created by the use offlatMap
, ensuring proper construction and teardown of the comprised resources.