From 499935b77e8bc9e6a1f23fad985543cdbd72ff75 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 2 Oct 2013 01:41:53 -0400 Subject: [PATCH] Silence occasional task failure that occurs from sending to the render task after it's shut down. --- src/components/main/constellation.rs | 2 +- src/components/main/pipeline.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/main/constellation.rs b/src/components/main/constellation.rs index 2b8c24c1da3..a7e06dd4a17 100644 --- a/src/components/main/constellation.rs +++ b/src/components/main/constellation.rs @@ -801,7 +801,7 @@ impl Constellation { fn set_ids(&self, frame_tree: @mut FrameTree) { let (port, chan) = comm::stream(); self.compositor_chan.send(SetIds(frame_tree.to_sendable(), chan, self.chan.clone())); - port.recv(); + port.try_recv(); for frame in frame_tree.iter() { frame.pipeline.grant_paint_permission(); } diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs index 4e7f7c066cf..1f7dbb8eef9 100644 --- a/src/components/main/pipeline.rs +++ b/src/components/main/pipeline.rs @@ -200,7 +200,7 @@ impl Pipeline { } pub fn grant_paint_permission(&self) { - self.render_chan.send(PaintPermissionGranted); + self.render_chan.try_send(PaintPermissionGranted); } pub fn revoke_paint_permission(&self) {