pub fn wait_for_all(
objects: &[impl AsHandle],
timeout: Option<Duration>,
alertable: Alertable,
) -> Result<WaitOutcome>Expand description
Wait until all of objects are signalled at once, for up to timeout: None is no limit and
Duration::ZERO only asks. WaitForMultipleObjectsEx with bWaitAll true.
The wait is atomic: it takes from the objects only when every one is signalled, and takes
from all of them together. A wait that times out has taken nothing, so an object that was
signalled during it is still signalled. The same handle may not appear twice: Windows
refuses it, and the error is the wait’s. (wait_for_any tolerates it and reports the first
index.)
The outcomes are WaitOutcome’s: Signalled is every object signalled and taken from;
Abandoned is the same with at least one a mutex whose owner ended without releasing it, and
the waiting thread owns every mutex; Alerted is an alertable wait ended by an APC, with nothing
taken.
§Errors
As wait_for_any.