[PATCH] D129119: Add llvm::llvm_fast_shutdown()
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 29 13:46:21 PDT 2022
efriedma added inline comments.
================
Comment at: llvm/lib/Support/Parallel.cpp:32
+
+static bool DefaultExecutorInitialized = false;
+
----------------
efriedma wrote:
> Do we need to worry about races accessing this boolean?
Looking again, maybe it's not an issue. It's only accessed in two places: the ThreadPoolExecutor constructor, and fast_shutdown_parallel(). There can't be two threads executing the ThreadPoolExecutor constructor, and fast_shutdown_parallel should not be called if there are other threads running.
Maybe worth explaining that in a comment, though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129119/new/
https://reviews.llvm.org/D129119
More information about the llvm-commits
mailing list