[PATCH] D114363: [ThreadPool] Do not return shared futures.
Daniel McIntosh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 25 09:07:44 PST 2021
DanielMcIntosh-IBM added a comment.
In D114363#3152433 <https://reviews.llvm.org/D114363#3152433>, @dblaikie wrote:
> In D114363#3152052 <https://reviews.llvm.org/D114363#3152052>, @fhahn wrote:
>
>> Funnily enough this is causing a build failure when threads are disabled, because `Tasks.push([Future]() { Future.get(); }); ` won't work. I reverted the patch for now.
>>
>> Any ideas on how to best deal with that? :)
>
> Sounds like it might be due to lambda capture by value/copy (but if you could copy/paste the error it might help diagnose) - maybe capturing by move is all that's required?
>
> [Future = std::move(Future)]() { Future.get(); }
I put the error message in a comment on this review: D114183 <https://reviews.llvm.org/D114183>, since that is the one that introduced the failure.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114363/new/
https://reviews.llvm.org/D114363
More information about the llvm-commits
mailing list