fn inject(&self, injected_jobs: &[JobRef]) {
        // It should not be possible for `state.terminate` to be true
        // here. It is only set to true when the user creates (and
        // drops) a `ThreadPool`; and, in that case, they cannot be
        // calling `inject()` later, since they dropped their
        // `ThreadPool`.
        debug_assert_ne!(
            self.shutdown_count.load(Ordering::Acquire),
            0,
            "inject() sees state.terminate as true"
        );

        let queue_was_empty = self.injected_jobs.is_empty();

        for &job_ref in injected_jobs {
            self.injected_jobs.push(job_ref);
        }

        self.on_new_injected_jobs(injected_jobs.len(), queue_was_empty);
    }
/// Push a job into the "external jobs" queue; it will be taken by
/// whatever worker has nothing to do. Use this is you know that
/// you are not on a worker of this registry.
Push a job into the "external jobs" queue; it will be taken by
whatever worker has nothing to do. Use this is you know that
you are not on a worker of this registry.
Push a job into the " external jobs " queue ; it will be taken by whatever worker has nothing to do . Use this is you know that you are not on a worker of this registry .
fn inject(&self, injected_jobs: &[JobRef]) {
        // It should not be possible for `state.terminate` to be true
        // here. It is only set to true when the user creates (and
        // drops) a `ThreadPool`; and, in that case, they cannot be
        // calling `inject()` later, since they dropped their
        // `ThreadPool`.
        debug_assert_ne!(
            self.shutdown_count.load(Ordering::Acquire),
            0,
            "inject() sees state.terminate as true"
        );
        let queue_was_empty = self.injected_jobs.is_empty();
        for &job_ref in injected_jobs {
            self.injected_jobs.push(job_ref);
        }
        self.on_new_injected_jobs(injected_jobs.len(), queue_was_empty);
    }
fn inject ( & self , injected_jobs : & [ JobRef ] ) { // It should not be possible for `state.terminate` to be true // here. It is only set to true when the user creates (and // drops) a `ThreadPool`; and, in that case, they cannot be // calling `inject()` later, since they dropped their // `ThreadPool`. debug_assert_ne ! ( self shutdown_count load ( Ordering Acquire ) 0 " " ) ; let queue_was_empty = self . injected_jobs . is_empty ( ) ; for & job_ref in injected_jobs { self . injected_jobs . push ( job_ref ) ; } self . on_new_injected_jobs ( injected_jobs . len ( ) , queue_was_empty ) ; }
Push a job into the "external jobs" queue; it will be taken by
whatever worker has nothing to do.
Push a job into the " external jobs " queue ; it will be taken by whatever worker has nothing to do .
&self
injected_jobs
&[JobRef]
&self
injected_jobs
&[JobRef]