diff options
author | Florian Hahn <flo@fhahn.com> | 2021-11-22 21:20:55 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2021-11-22 21:20:55 +0000 |
commit | 6149e57dc1313d32c85524f8009a1249e0b8f4d1 (patch) | |
tree | 13a72e657bf6b85a60667e7fc68fc0aaab7e9f18 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 615ecd8afc43b3ac5aa54053bff26002a0ce7ce6 (diff) | |
download | llvm-6149e57dc1313d32c85524f8009a1249e0b8f4d1.zip llvm-6149e57dc1313d32c85524f8009a1249e0b8f4d1.tar.gz llvm-6149e57dc1313d32c85524f8009a1249e0b8f4d1.tar.bz2 |
[ThreadPool] Support returning futures with results.
This patch adjusts ThreadPool::async to return futures that wrap
the result type of the passed in callable.
To do so, ThreadPool::asyncImpl first creates a shared promise. The
result of the promise is set in a new callable that first executes the
task. The callable is added to the task queue.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D114183
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions