Page MenuHomePhabricator

[lldb] Minor fixes in TaskPool
ClosedPublic

Authored by alexshap on Nov 28 2017, 3:47 PM.

Details

Summary
  1. Move everything into the namespace lldb_private
  2. Add missing std::move in TaskPoolImpl::Worker
  3. std::thread::hardware_concurrency may return 0, handle this case correctly

Diff Detail

Repository
rL LLVM

Event Timeline

alexshap created this revision.Nov 28 2017, 3:47 PM
clayborg accepted this revision.Nov 28 2017, 3:59 PM
This revision is now accepted and ready to land.Nov 28 2017, 3:59 PM
alexshap updated this revision to Diff 124661.Nov 28 2017, 3:59 PM

fix the tests

alexshap retitled this revision from [lldb] Minor fixes for in TaskPool to [lldb] Minor fixes in TaskPool.Nov 28 2017, 4:01 PM
labath edited edge metadata.Nov 29 2017, 1:26 AM

Looks good, thanks.

labath accepted this revision.Nov 29 2017, 1:26 AM
fjricci added inline comments.Nov 29 2017, 5:49 AM
source/Host/common/TaskPool.cpp
55 ↗(On Diff #124661)

Is 1 the best default here when hardware_concurrency() isn't computable? Seems like it could have some big performance implications, and I'm not sure how common it is for people to debug on host machines that only support one thread.

This revision was automatically updated to reflect the committed changes.