[all-commits] [llvm/llvm-project] a5fff5: [ThreadPool] Do not return shared futures.
Florian Hahn via All-commits
all-commits at lists.llvm.org
Tue Nov 23 02:06:37 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a5fff58781f30ff3fd7a3f56948552cf7b8842bb
https://github.com/llvm/llvm-project/commit/a5fff58781f30ff3fd7a3f56948552cf7b8842bb
Author: Florian Hahn <flo at fhahn.com>
Date: 2021-11-23 (Tue, 23 Nov 2021)
Changed paths:
M llvm/include/llvm/Support/ThreadPool.h
M mlir/include/mlir/IR/Threading.h
Log Message:
-----------
[ThreadPool] Do not return shared futures.
The only users of returned futures from ThreadPool is llvm-reduce after
D113857.
There should be no cases where multiple threads wait on the same future,
so there should be no need to return std::shared_future<>. Instead return
plain std::future<>.
If users need to share a future between multiple threads, they can share
the futures themselves.
Reviewed By: Meinersbur, mehdi_amini
Differential Revision: https://reviews.llvm.org/D114363
More information about the All-commits
mailing list