diff --git a/.pick_status.json b/.pick_status.json index 24d7d524380..087265dd6ec 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2326,7 +2326,7 @@ "description": "rusticl/event: ensure even status is updated in order", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "47a80d7ff4f966e3839640efd5f9d75e36af8906" }, diff --git a/src/gallium/frontends/rusticl/core/queue.rs b/src/gallium/frontends/rusticl/core/queue.rs index aa23b397972..a826c63134d 100644 --- a/src/gallium/frontends/rusticl/core/queue.rs +++ b/src/gallium/frontends/rusticl/core/queue.rs @@ -82,14 +82,14 @@ impl Queue { pub fn flush(&self, wait: bool) -> CLResult<()> { let mut p = self.pending.lock().unwrap(); - let last = p.last().cloned(); + let events = p.clone(); // This should never ever error, but if it does return an error self.chan_in .send((*p).drain(0..).collect()) .map_err(|_| CL_OUT_OF_HOST_MEMORY)?; if wait { - if let Some(last) = last { - last.wait(); + for e in events { + e.wait(); } } Ok(())