]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/async: spawn_throttle wraps call to asio::spawn() 58798/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 22 Jul 2024 20:48:29 +0000 (16:48 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 24 Jul 2024 19:35:05 +0000 (15:35 -0400)
commitf03d0cec0fcb52c8c36e80d0976cb2eaedf547f1
treec94d3e470bf9ba2ff4e8708190a42ad93fdb3f89
parent86385b1daf5235400bbcd34a02515d168bde88e2
common/async: spawn_throttle wraps call to asio::spawn()

cancellation of the parent must immediately cancel its children, which
only works if the children are on the same executor as the parent

prohibit child coroutines from being spawned on a different executor by
wrapping the call to asio::spawn() in a new spawn_throttle::spawn()
interface

expose an overload for asio::spawn()'s optional StackAllocator argument

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/async/max_concurrent_for_each.h
src/common/async/spawn_throttle.h
src/rgw/rgw_op.cc
src/test/common/test_async_spawn_throttle.cc