Skip to content

Commit

Permalink
thread-pool: split thread_pool into thread_pool+work_group
Browse files Browse the repository at this point in the history
Previously thread_pool took care of two different concerns:
1) Being able to reuse threads for work
2) Sharing threads for concurrent non-blocking computations

To be able to support both of these concerns we needed to add a lot of
complexity to the class.  Splitting it into two, a thread_pool, that
only lets us borrow threads for a while, and a work group, with which
you can share threads to do non-blocking computations, made the code
much easier to understand.
  • Loading branch information
sebsura committed Nov 6, 2023
1 parent c7e3a0d commit b1d7733
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 241 deletions.
1 change: 0 additions & 1 deletion core/src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ set(BAREOS_SRCS
tree.cc
try_tls_handshake_as_a_server.cc
compression.cc
thread_pool.cc
util.cc
var.cc
watchdog.cc
Expand Down
157 changes: 0 additions & 157 deletions core/src/lib/thread_pool.cc

This file was deleted.

0 comments on commit b1d7733

Please sign in to comment.