Luna::new_semaphore

Ref< ISemaphore > new_semaphore(i32 initial_count, i32 max_count)

Create a new semaphore object.

Parameters

  • in initial_count

    The initial count of the semaphore.

  • in max_count

    The max count the specified semaphore can reach to.

Return value

Returns the new created semaphore object.