clayborg added a comment. In http://reviews.llvm.org/D13727#268084, @tberghammer wrote:
> Addressing comments from the discussion with destroying the treads not in use > while keeping a global thread pool with at most hardware_concurrency threads. We should perf test this, but I would be OK with parked threads to tell the truth. I think we should prove they are taking up resources first before we try and destroy them. > IMO this update also simplifies the implementation of the ThreadPool with > removing the conditional_variable. > > A possible future improvement is to destroy the threads only if they are idle > for a given time (e.g. 50 ms) so we still don't have them hanging around > while we can avoid the possibly unnecessary thread creation and destroyation > in case the tasks coming in slowly. Not sure what the right timeout would be, I would rather just leave them parked and ready unless we prove they are taking up resources. They are going to be parked in the kernel awaiting synchronization, so I don't really see the point of tearing the thread down. http://reviews.llvm.org/D13727 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits