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

x/async/condition.ts>Condition#wait

🦕 Asynchronous primitive modules loosely port from Python's asyncio for Deno.
Go to Latest
method Condition.prototype.wait
import { Condition } from "https://deno.land/x/async@v1.1.2/condition.ts";

Wait until notified.

If the calling task has not acquired the lock when this method is called, an Error is thrown.

This method release the underlying lock, and the blocks until it is awakened by a notify() or notify_all() call. Once awakened, the Condition re-acquires itsock and this method returns true.

Returns

Promise<true>