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

@ -13,7 +13,7 @@ use script_runtime::{CommonScriptMsg, ScriptChan, ScriptThreadEventCategory};
use std::fmt;
use std::result::Result;
use task::{TaskCanceller, TaskOnce};
use task_source::TaskSource;
use task_source::{TaskSource, TaskSourceName};
#[derive(JSTraceable)]
pub struct PerformanceTimelineTaskSource(pub Box<ScriptChan + Send + 'static>, pub PipelineId);
@ -31,6 +31,8 @@ impl fmt::Debug for PerformanceTimelineTaskSource {
}
impl TaskSource for PerformanceTimelineTaskSource {
const NAME: TaskSourceName = TaskSourceName::PerformanceTimeline;
fn queue_with_canceller<T>(
&self,
task: T,