[PATCH] D114363: [ThreadPool] Do not return shared futures.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 13:17:09 PST 2021


dblaikie added a comment.

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(); }


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