mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace mpsc with crossbeam/servo channel, update ipc-channel
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
This commit is contained in:
parent
b977b4994c
commit
2a996fbc8f
89 changed files with 341 additions and 377 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue