[Lldb-commits] [PATCH] D13727: Add task pool to LLDB
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 14 11:25:40 PDT 2015
clayborg added a comment.
Any std::async adoption will need to be able to deliver tasks as they complete via "TaskRunner<T>::WaitForNextCompletedTask()".
We had a previous example where 1000 items could be pushed onto a std::vector of tasks and then the code was doing:
for (i=0; i<tasks.size(); ++i)
This means that if the first of 1000 jobs took 100 seconds, but the other 999 took 0.1 seconds each, then it would stall the pipeline waiting for the first one to complete. I want to make sure we can do:
while (auto future = task_runner. WaitForNextCompletedTask())
So we can process the items as needed as they complete. So as long as we can still do this with the implementation we use I will be happy.
More information about the lldb-commits