|Maintainer||Bas van Dijk <email@example.com>|
Unsafely opening and closing of scarce resources.
Class of scarce resources. A scarce resource is a resource that only one user can use at a time. (like a file, memory pointer or USB device for example).
Because of the scarcity, these resources need to be opened to grant temporary sole access to the resource. When the resource is no longer needed it should be closed a.s.a.p to grant others access to the resource.
IO computation that opens the given resource and returns a
Handle on it.
Think of a handle as your private session with the resource. As long as you have it, other users can't use the resource. So don't forget to close this session with the resource as soon as you're done with it.
IO computation that closes the resource identified by the
Warning: Using the
Handle after the resource has been closed will
usually throw an exception or result in a program crash!