introduce "per task source" ignoring of tasks

This commit is contained in:
Gregory Terzian 2018-07-05 12:33:09 +08:00
parent ce430566cd
commit 671627e97e
21 changed files with 127 additions and 34 deletions

View file

@ -5,7 +5,7 @@
use msg::constellation_msg::PipelineId;
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
use task::{TaskCanceller, TaskOnce};
use task_source::TaskSource;
use task_source::{TaskSource, TaskSourceName};
#[derive(JSTraceable)]
pub struct NetworkingTaskSource(pub Box<ScriptChan + Send + 'static>, pub PipelineId);
@ -17,6 +17,8 @@ impl Clone for NetworkingTaskSource {
}
impl TaskSource for NetworkingTaskSource {
const NAME: TaskSourceName = TaskSourceName::Networking;
fn queue_with_canceller<T>(
&self,
task: T,