]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/async: add max_concurrent_for_each() algorithm 57188/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 9 May 2024 17:00:57 +0000 (13:00 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 23 May 2024 13:06:06 +0000 (09:06 -0400)
commit25017d6196b662e13ea7fb00e975834dfd5c6f06
tree47e5da24c113bbbded9211cc1a238a27624d922a
parent0da024f92813323b58048947172f7d499701c55d
common/async: add max_concurrent_for_each() algorithm

inspired by seastar's max_concurrent_for_each(), implemented for
optional_yield in terms of yield_throttle

can also be overloaded for co_await() and co_throttle (not part of this
branch)

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/async/max_concurrent_for_each.h [new file with mode: 0644]
src/test/common/CMakeLists.txt
src/test/common/test_async_max_concurrent_for_each.cc [new file with mode: 0644]