Skip to content
Commit 61075468 authored by Tom Tromey's avatar Tom Tromey
Browse files

Avoid submitting empty tasks in parallel_for_each

I found that parallel_for_each would submit empty tasks to the thread
pool.  For example, this can happen if the number of tasks is smaller
than the number of available threads.  In the DWARF reader, this
resulted in the cooked index containing empty sub-indices.  This patch
arranges to instead shrink the result vector and process the trailing
entries in the calling thread.

(cherry picked from commit 63078a04)
parent 2ec96946
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment