Skip to content

Commit a8a202d

Browse files
ywxtZoxc
andcommitted
Add a comment for the wait_for_jobs function.
Co-authored-by: Zoxc <[email protected]>
1 parent ccd9af7 commit a8a202d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_thread_pool/src/registry.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,8 @@ impl WorkerThread {
800800
unsafe { self.wait_or_steal_until(latch, false) };
801801
}
802802

803+
// Wait until the latch is set. Executes local jobs if `is_job` is true for them and
804+
// `all_jobs_started` still returns false.
803805
#[inline]
804806
pub(super) unsafe fn wait_for_jobs<L: AsCoreLatch + ?Sized, const BROADCAST_JOBS: bool>(
805807
&self,

0 commit comments

Comments
 (0)