<?php

function wait_concurrently ($id ::: future<any>) ::: bool;

/** @kphp-extern-func-info can_throw cpp_template_call */
function wait_multi (future<any>[] $resumables) ::: (^1[*][*] | null)[];

function wait_queue_create (array< future<any> | false > $request_ids = []) ::: future_queue<^1[*][*]>;

function wait_queue_push (future_queue<any> &$queue_id, future<any> | false $request_ids) ::: void;

function wait_queue_empty (future_queue<any> $queue_id) ::: bool;

function wait_queue_next (future_queue<any> $queue_id, $timeout ::: float = -1.0) ::: future<^1[*]> | false;
