Grant for exclusive access to shared resources.
class Grant \ from Waitable
release from Waitable | Releases a structure acquired by a waiting function. |
class Grant \ from Waitable
Grant for exclusive access to shared resources.
This class can be sucessfully waited only by a thread at a time. When a thread acquires it, other threads will have to wait for the acquirer to release this with Waitable.release.
If the grant is currently available, waiting functions return immediately with the Grant acquired.
This structure can be seen as a sort of a "reverse heavy weight mutex".