[PATCH] D48240: Try again to implement a FIFO task queue
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 18 16:39:03 PDT 2018
zturner added inline comments.
================
Comment at: llvm/include/llvm/Support/TaskQueue.h:41-43
+ std::shared_future<void> ParentFuture;
+ std::shared_future<void> ThisFuture;
+ std::function<void()> ThisTask;
----------------
labath wrote:
> Are all of these really needed? The only use of ParentFuture I see is in the lambda in ThisFuture, and that one already has it captured. `ThisTask` is not captured by that lambda, but it could easily be, at which point the whole Task struct could just become `std::shared_future<void>`.
I was able to remove them as you suggested in this patch, but things get more tricky in the follow-up patch where I extend this to allow the queued up tasks to return values. Regardless, since these are independent patches, I'm uploading a new version that has the suggested changes and I can try to make the other one use a similar model separately.
https://reviews.llvm.org/D48240
More information about the llvm-commits
mailing list