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

x/async/mod.ts>Condition#with

🦕 Asynchronous primitive modules loosely port from Python's asyncio for Deno.
Go to Latest
method Condition.prototype.with
Re-export
import { Condition } from "https://deno.land/x/async@v1.1.5/mod.ts";

Acuire the lock and execute callback to access shared state.

This is preferred way to use a Condition.

Parameters

callback: () => void | Promise<void>

Returns

Promise<void>