Object <- FixedList <- ObjectList <- Semaphore <- FailsafeSemaphore |
|
|
Access Finalize Init ReinitializeClass Release ReleaseFailsafe |
Class FailsafeSemaphore defines no new attributes.
Fields
| Field | Type | |
|---|---|---|
| Semaphore: | releaseCount: | Signed |
| FailsafeSemaphore: | actor: | Actor |
instance FailsafeSemaphore tag; releaseCount: 0; actor: nilObject; end instance;
// // FailsafeSemaphores release even if the actor that has one accessed but // is not blocked on it gets destroyed. This guarantees that code waiting for // a semaphore will run regardless of the time window in which actors are destroyed. // Define Class FailsafeSemaphore; inherits from Semaphore; field actor: Actor, weak; class operation ReleaseFailsafe(actor: Actor); // release any semaphores accessed by this actor overrides ReinitializeClass, Init, Finalize; overrides Access, Release; end class;