async fn gather( capture_id: &str, phase: &str, expected: usize, wait: Duration, publish: impl FnOnce(), ) -> Vec<WindowCaptureMask>