From 44e69f592f4e80a39abe98db5279e03e00c73cef Mon Sep 17 00:00:00 2001 From: ywxt Date: Thu, 26 Jun 2025 12:30:38 +0800 Subject: Add a comment for the `wait_for_jobs` function. Co-authored-by: Zoxc --- compiler/rustc_thread_pool/src/registry.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_thread_pool/src') diff --git a/compiler/rustc_thread_pool/src/registry.rs b/compiler/rustc_thread_pool/src/registry.rs index 5e2f2e7f1b7..ccf4561014f 100644 --- a/compiler/rustc_thread_pool/src/registry.rs +++ b/compiler/rustc_thread_pool/src/registry.rs @@ -800,6 +800,8 @@ impl WorkerThread { unsafe { self.wait_or_steal_until(latch, false) }; } + // Wait until the latch is set. Executes local jobs if `is_job` is true for them and + // `all_jobs_started` still returns false. #[inline] pub(super) unsafe fn wait_for_jobs( &self, -- cgit 1.4.1-3-g733a5