diff --git a/src/job.rs b/src/job.rs index 6bd39f5..38726b8 100644 --- a/src/job.rs +++ b/src/job.rs @@ -48,12 +48,12 @@ impl Future { thread::park(); - // Skip spininning after being woken up. + // Skip yielding after being woken up. continue; } Err(state) if state == Poll::Ready as u8 => { - // `state` is `Poll::Ready` only after after - // `Self::complete` releases the lock. + // `state` is `Poll::Ready` only after `Self::complete` + // releases the lock. // // Calling `Self::complete` when `state` is `Poll::Ready` // cannot mutate `self.val`. @@ -147,10 +147,11 @@ impl Job { { // The `stack` is still alive. let stack: &JobStack = unsafe { stack.cast().as_ref() }; - // This is the first call to `take_once` the closure since - // `Job::execute` is called only after the job has been popped. + // This is the first call to `take_once` since `Job::execute` + // (the only place where this harness is called) is called only + // after the job has been popped. let f = unsafe { stack.take_once() }; - // Before being popped, the `JobQueue` allocates and store a + // Before being popped, the `JobQueue` allocates and stores a // `Future` in `self.fur_or_next` that should get passed here. let fut: &Future = unsafe { fut.cast().as_ref() }; @@ -178,7 +179,7 @@ impl Job { self.fut_or_next .get() .map(|fut| { - // Before being popped, the `JobQueue` allocates and store a + // Before being popped, the `JobQueue` allocates and stores a // `Future` in `self.fur_or_next` that should get passed here. let fut = unsafe { fut.as_ref() }; fut.poll() diff --git a/src/lib.rs b/src/lib.rs index fed749d..83d6c0b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -418,7 +418,7 @@ pub struct Config { /// The number of threads or `None` to use /// `std::thread::available_parallelism`. pub thread_count: Option, - /// The interaval between heartbeats on any particular thread. + /// The interval between heartbeats on any particular thread. pub heartbeat_interval: Duration, } @@ -696,7 +696,7 @@ mod tests { // Since there was no panic up to this point, this means that the // thread boundary has not been crossed. // - // Check that the work was done and pass the testt artificially. + // Check that the work was done and pass the test artificially. if !threads_crossed { assert_eq!(vals, [1; 10]); panic!("panicked across threads");