Task.WaitCondition

A wait condition object allows you to create a pending Task object, and trigger it later.

async function wait()

Returns a task that waits for a corresponding call to wake().

function wake()

Wake all tasks currently waiting on this condition.