Skip to content

Commit

Permalink
remove spans from scheduler for now
Browse files Browse the repository at this point in the history
  • Loading branch information
WorldSEnder committed Aug 6, 2022
1 parent 65599fa commit 2894edc
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/yew/src/scheduler.rs
Expand Up @@ -15,7 +15,6 @@ pub trait Runnable {

struct QueueEntry {
task: Box<dyn Runnable>,
span: Span,
}

#[derive(Default)]
Expand All @@ -25,9 +24,7 @@ struct FifoQueue {

impl FifoQueue {
fn push(&mut self, task: Box<dyn Runnable>) {
let span = tracing::span!(tracing::Level::TRACE, "scheduler-task");
span.follows_from(Span::current());
self.inner.push(QueueEntry { task, span });
self.inner.push(QueueEntry { task });
}

fn drain_into(&mut self, queue: &mut Vec<QueueEntry>) {
Expand All @@ -45,9 +42,7 @@ struct TopologicalQueue {
impl TopologicalQueue {
#[cfg(any(feature = "ssr", feature = "csr"))]
fn push(&mut self, component_id: usize, task: Box<dyn Runnable>) {
let span = tracing::span!(tracing::Level::TRACE, "scheduler-task");
span.follows_from(Span::current());
self.inner.insert(component_id, QueueEntry { task, span });
self.inner.insert(component_id, QueueEntry { task });
}

/// Take a single entry, preferring parents over children
Expand Down Expand Up @@ -199,7 +194,6 @@ pub(crate) fn start_now() {
break;
}
for r in queue.drain(..) {
let _enter = r.span.entered();
r.task.run();
}
}
Expand Down Expand Up @@ -244,7 +238,6 @@ mod arch {
}

pub(crate) use arch::*;
use tracing::Span;

impl Scheduler {
/// Fill vector with tasks to be executed according to Runnable type execution priority
Expand Down

0 comments on commit 2894edc

Please sign in to comment.