[PATCH] D48240: Try again to implement a FIFO task queue
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 20 17:48:12 PDT 2018
zturner updated this revision to Diff 152208.
zturner added a comment.
Updated with suggestions from chandler. I'm not sure why all my tests passed even despite having that bug that he noticed. Would be nice if there were a way to write a test for that case, but I'm not sure how. I also made the cleanup suggested to eliminate the extra cost of copying the task. This was a little bit annoying, because I had to go back to using the callable object instead of using the lambda so that I could get move semantics of the callable. But this means I can't easily capture `this`, so I had to move the callable up to the class level so that I could make it a friend to give it access to `TaskQueue`'s internal state. Anyway, it all works now.
https://reviews.llvm.org/D48240
Files:
llvm/include/llvm/Support/TaskQueue.h
llvm/unittests/Support/CMakeLists.txt
llvm/unittests/Support/TaskQueueTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48240.152208.patch
Type: text/x-patch
Size: 10578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180621/1d8a886f/attachment.bin>
More information about the llvm-commits
mailing list