diff options
| author | ywxt <ywxtcwh@gmail.com> | 2025-06-26 12:30:38 +0800 |
|---|---|---|
| committer | ywxt <ywxtcwh@gmail.com> | 2025-06-28 17:58:20 +0800 |
| commit | 44e69f592f4e80a39abe98db5279e03e00c73cef (patch) | |
| tree | d5175ae9fca761f8a389919723ca50b12207951b | |
| parent | 0ceac216c9ea96b4b63cba77ae1fabfc8e0320a1 (diff) | |
| download | rust-44e69f592f4e80a39abe98db5279e03e00c73cef.tar.gz rust-44e69f592f4e80a39abe98db5279e03e00c73cef.zip | |
Add a comment for the `wait_for_jobs` function.
Co-authored-by: Zoxc <zoxc32@gmail.com>
| -rw-r--r-- | compiler/rustc_thread_pool/src/registry.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<L: AsCoreLatch + ?Sized, const BROADCAST_JOBS: bool>( &self, |
