Io module

notify_one

procedureextensionexperimentalsince 0.27.0Source

Wakes the fiber that has waited longest, if any.

Example↗
Io :: #import "Extensions/Io";

Io.io_run(() {
    changed: Io.Condition;

    Io.spawn((changed: *Io.Condition) { Io.notify_one(changed); }, *changed);

    assert(Io.wait(*changed) == .NONE); // the spawned fiber notifies
});
notify_one :: (condition: *Condition)

Parameters

condition: *Condition

See also