Skip to content

Counting Semaphore

Requirement ID: F002-3

User Story

As a developer, I want to create an object that can be taken/given a multiple times, so that I synchronize multiple tasks.

Acceptance Criteria

  1. Syntax and behavior similar to tokio::sync::Semaphore:
    • The number of permits can be set at Semaphore::new(<permits>)
    • A permit can be acquired
    • The permit is released automatically (when goes out of scope)
Edited by Stefan Lüthi