Semaphore
A semaphore object to enable synchronisation between managed objects. Typically used when interacting with GUIs
Operation | Description |
create |
Creates a new semaphore with zero permits available. The first acquire will block the task. |
create: initial |
Creates a new semaphore with anInteger permits available. |
Operation | Return | Description |
wait |
self |
Tries to acquire a permit. If none are available then the task will hang until one becomes available |
release |
self |
Releases the semaphore ay incrementing the number of permits available. If a task is blocked on this semaphore then that task is released instead of increasing the number of permits. |