]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/os/alienstore: use semaphore to manage tasks in thread pool 41976/head
authorKefu Chai <kchai@redhat.com>
Tue, 29 Jun 2021 12:06:49 +0000 (20:06 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 29 Jun 2021 16:01:12 +0000 (00:01 +0800)
commitd8461201866f7e7018c7845c847ae879255396b5
treecdf5ec2ecbd31697b9badbabae6560adadc00b31
parent6ca774dbc719a2eac89135ef8e717bfcfbc34b5f
crimson/os/alienstore: use semaphore to manage tasks in thread pool

* implement std::counting_semaphore in C++17
* use the homebrew counting_semaphore as the synchronization primitive
  to access the pending tasks, for better performance than the
  implementation using mutex and condition_variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/os/alienstore/semaphore.h [new file with mode: 0644]
src/crimson/os/alienstore/thread_pool.h