fn push_task( &self, task: Arc< Task > ) {
        let mut inner = self.queue.inner.borrow_mut();

        inner.queue.push_back( task );

        // If the queue was previously empty, then we need to schedule
        // the queue to be drained.
        //
        // The check for `is_draining` is necessary in the situation where
        // the `drain` method pops the last task from the queue, but that
        // task then re-queues another task.
        if inner.queue.len() == 1 && !self.queue.is_draining.get() {
            self.queue_microtask();
        }
    }
// Pushes a task onto the queue
Pushes a task onto the queue
Pushes a task onto the queue
fn push_task( &self, task: Arc< Task > ) {
        let mut inner = self.queue.inner.borrow_mut();
        inner.queue.push_back( task );
        // If the queue was previously empty, then we need to schedule
        // the queue to be drained.
        //
        // The check for `is_draining` is necessary in the situation where
        // the `drain` method pops the last task from the queue, but that
        // task then re-queues another task.
        if inner.queue.len() == 1 && !self.queue.is_draining.get() {
            self.queue_microtask();
        }
    }
fn push_task ( & self , task : Arc < Task > ) { let mut inner = self . queue . inner . borrow_mut ( ) ; inner . queue . push_back ( task ) ; // If the queue was previously empty, then we need to schedule // the queue to be drained. // // The check for `is_draining` is necessary in the situation where // the `drain` method pops the last task from the queue, but that // task then re-queues another task. if inner . queue . len ( ) == 1 && ! self . queue . is_draining . get ( ) { self . queue_microtask ( ) ; } }
Pushes a task onto the queue
Pushes a task onto the queue
&self
task
Arc< Task >
&self
task
Arc< Task >