Skip to content
Snippets Groups Projects

Custom thread pool

Merged Peter Bell requested to merge thread_pool into master

As promised, a thread pool in <200 lines of C++. This doesn't handle fork yet and I should emphasise that this wasn't originally written for performance sensitive code.

Some preliminary testing shows that there is roughly a 10-15 us penalty for nthreads > 1. I'm sure this can be brought down, by e.g.

  • reducing work queue contention
  • making work items less generic
  • using more atomics and fewer locks

Question: should I put the OpenMP code back and just use this as a fallback?

Edited by Peter Bell

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading