diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-09-12 13:33:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 13:33:45 -0400 |
commit | 910cc23a6e85cced43905f7615065b23bdb54b42 (patch) | |
tree | 3ceae959c0ebdf3f224c5c07f5b8c2cbd31dddf1 /components/script/task_source | |
parent | 9a83ab6297ddb62937fc54521b7fd4d19017e6b1 (diff) | |
parent | 2a996fbc8fef722b264389680cc55c25c46807d1 (diff) | |
download | servo-910cc23a6e85cced43905f7615065b23bdb54b42.tar.gz servo-910cc23a6e85cced43905f7615065b23bdb54b42.zip |
Auto merge of #21325 - gterzian:crossbeam_integration, r=SimonSapin,jdm
Replace mpsc with crossbeam-channel
Follow up on https://github.com/servo/servo/pull/19515
---
Selecting over multiple channels in `std::sync::mpsc` is not stable and likely never will be:
https://github.com/rust-lang/rust/issues/27800#issuecomment-260136777
> It seems the only thing keeping `mpsc_select` around is Servo.
crossbeam-channel is designed specifically to replace `std::sync::mpsc` and fix many of its shortcomings:
https://github.com/stjepang/rfcs-crossbeam/blob/channel/text/2017-11-09-channel.md
This is to be landed together with https://github.com/servo/ipc-channel/pull/183.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21325)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/task_source')
-rw-r--r-- | components/script/task_source/dom_manipulation.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/history_traversal.rs | 2 | ||||
-rw-r--r-- | components/script/task_source/user_interaction.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs index f184aa3d828..e72110479de 100644 --- a/components/script/task_source/dom_manipulation.rs +++ b/components/script/task_source/dom_manipulation.rs @@ -11,9 +11,9 @@ use msg::constellation_msg::PipelineId; use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory}; use script_thread::MainThreadScriptMsg; use servo_atoms::Atom; +use servo_channel::Sender; use std::fmt; use std::result::Result; -use std::sync::mpsc::Sender; use task::{TaskCanceller, TaskOnce}; use task_source::{TaskSource, TaskSourceName}; diff --git a/components/script/task_source/history_traversal.rs b/components/script/task_source/history_traversal.rs index ffd657adada..7f44ba368b5 100644 --- a/components/script/task_source/history_traversal.rs +++ b/components/script/task_source/history_traversal.rs @@ -4,7 +4,7 @@ use script_runtime::{ScriptChan, CommonScriptMsg}; use script_thread::MainThreadScriptMsg; -use std::sync::mpsc::Sender; +use servo_channel::Sender; #[derive(JSTraceable)] pub struct HistoryTraversalTaskSource(pub Sender<MainThreadScriptMsg>); diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index 2beaee95731..d30d54829b5 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -11,9 +11,9 @@ use msg::constellation_msg::PipelineId; use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory}; use script_thread::MainThreadScriptMsg; use servo_atoms::Atom; +use servo_channel::Sender; use std::fmt; use std::result::Result; -use std::sync::mpsc::Sender; use task::{TaskCanceller, TaskOnce}; use task_source::{TaskSource, TaskSourceName}; |