On this page:
Semaphore
Semaphore.post
Semaphore.wait
Semaphore.poll
Semaphore.handle
Semaphore.from_  handle
8.15.0.12

15.2 Semaphore🔗ℹ

class

class Semaphore():

  constructor (init :: NonnegInt = 0)

Constructs a semaphore that initially has init Semaphore.post actions.

method

method (sema :: Semaphore).post() :: Void

 

method

method (sema :: Semaphore).wait() :: Void

 

method

method (sema :: Semaphore).poll() :: Boolean

Posts, waits, or polls a semaphore. When Semaphore.poll successfully waits on a semaphore, it returns #true, otherwise it returns #false.

property

property (sema :: Semaphore).handle

 

function

fun Semaphore.from_handle(handle) :: Semaphore

The Semaphore.handle property accesses a semaphore object’s underlying Racket representation. The Semaphore.from_handle function constructs a Rhombus semaphore object from a Racket semaphore object.