Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/channel/custom/sync/semaphore-impl.ts>SemaphoreImpl

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class SemaphoreImpl
implements Semaphore
import { SemaphoreImpl } from "https://deno.land/x/rimbu@1.1.0/channel/custom/sync/semaphore-impl.ts";

Constructors

new
SemaphoreImpl(maxSize: number)

Methods

acquire(weight?): Promise<void>
canAcquire(weight?): boolean
release(weight?): void