aboutsummaryrefslogtreecommitdiffstats
path: root/components/webvr/webvr_thread.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-12-17 23:53:32 +0100
committerGregory Terzian <gterzian@users.noreply.github.com>2018-09-12 13:33:32 +0800
commit2a996fbc8fef722b264389680cc55c25c46807d1 (patch)
tree22c19321899cf4b35384c8c8e186f1a0bf7913c8 /components/webvr/webvr_thread.rs
parentb977b4994c678ce1d9bca69be72d095522c25f71 (diff)
downloadservo-2a996fbc8fef722b264389680cc55c25c46807d1.tar.gz
servo-2a996fbc8fef722b264389680cc55c25c46807d1.zip
Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
Diffstat (limited to 'components/webvr/webvr_thread.rs')
-rw-r--r--components/webvr/webvr_thread.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/components/webvr/webvr_thread.rs b/components/webvr/webvr_thread.rs
index ac2d4671de6..55d7e31c7c6 100644
--- a/components/webvr/webvr_thread.rs
+++ b/components/webvr/webvr_thread.rs
@@ -9,11 +9,10 @@ use ipc_channel::ipc::{IpcReceiver, IpcSender};
use msg::constellation_msg::PipelineId;
use rust_webvr::VRServiceManager;
use script_traits::ConstellationMsg;
+use servo_channel::{channel, Receiver, Sender};
use servo_config::prefs::PREFS;
use std::{thread, time};
use std::collections::{HashMap, HashSet};
-use std::sync::mpsc;
-use std::sync::mpsc::{Receiver, Sender};
use webvr_traits::{WebVRMsg, WebVRResult};
use webvr_traits::webvr::*;
@@ -72,7 +71,7 @@ impl WebVRThread {
vr_compositor_chan: WebVRCompositorSender,
) -> (IpcSender<WebVRMsg>, Sender<Sender<ConstellationMsg>>) {
let (sender, receiver) = ipc::channel().unwrap();
- let (constellation_sender, constellation_receiver) = mpsc::channel();
+ let (constellation_sender, constellation_receiver) = channel();
let sender_clone = sender.clone();
thread::Builder::new()
.name("WebVRThread".into())
@@ -358,7 +357,7 @@ pub type WebVRCompositorSender = Sender<Option<WebVRCompositor>>;
impl WebVRCompositorHandler {
pub fn new() -> (Box<WebVRCompositorHandler>, WebVRCompositorSender) {
- let (sender, receiver) = mpsc::channel();
+ let (sender, receiver) = channel();
let instance = Box::new(WebVRCompositorHandler {
compositors: HashMap::new(),
webvr_thread_receiver: receiver,