Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/async/condition.ts>Condition#with

🦕 Asynchronous primitive modules loosely port from Python's asyncio for Deno.
Go to Latest
method Condition.prototype.with
import { Condition } from "https://deno.land/x/async@v1.1.2/condition.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>