Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/semaphore/semaphore.ts>Semaphore

https://deno.land/x/semaphore@v1.1.1
Latest
class Semaphore
import { Semaphore } from "https://deno.land/x/semaphore@v1.1.2/semaphore.ts";

Constructors

new
Semaphore(count: number)

Properties

private
tasks: (() => void)[]
count: number
readonly
length: number

returns current scheduled tasks length

Methods

private
schedule()
use<T>(fn: () => Promise<T>)