Repository navigation
common/async: add primitives for structured concurrency with optional_yield - #57188
Conversation
104e300 to
9179481
Compare
3c3600f to
5c390ae
Compare
e526a72 to
d1cec20
Compare
|
@cfsnyder i used this |
commented in https://tracker.ceph.com/issues/65585#note-12 |
|
jenkins test make check |
d448be7 to
79a6459
Compare
d1cec20 to
db12f04
Compare
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
db12f04 to
a05c668
Compare
|
sorry for the review spam, i had to change the base branch |
…l_yield a primitive for structured concurrency with stackful coroutines from boost::asio::spawn(). this relies on spawn()'s support for per-op cancellation to guarantee that the lifetime of child coroutines won't exceed the lifetime of their spawn_throttle, making it safe for children to access memory from their parent's stack by taking optional_yield in the constructor, spawn_throttle transparently supports synchronous execution (where optional_yield is empty) and asynchronous execution within a stackful coroutine (where optional_yield contains the parent's yield_context) Signed-off-by: Casey Bodley <[email protected]>
a05c668 to
1689c72
Compare
|
thanks @adamemerson. i decided to move the rgw stuff into #57641 so we can merge this one without qa |
|
p.s. once #56499 merges, i'd also like to add an overload of |
|
|
jenkins test api |
|
jenkins test windows |
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 <[email protected]>
c70623d to
25017d6
Compare
Backport-Id: 01a0611b-47ce-7192-b2fc-daedac74c5c9 Backport-PR: #10 Upstream-PRs: ceph#61256, ceph#58229, ceph#57188
Backport-Id: 01a0611b-47ce-7192-b2fc-daedac74c5c9 Backport-PR: #10 Upstream-PRs: ceph#61256, ceph#58229, ceph#57188
Backport-Id: 01a1443c-8dac-713b-90c4-9dd10156135c Backport-PR: #34 Upstream-PRs: ceph#61256, ceph#58229, ceph#57188
(based on feature branch wip-boost-asio-spawn from #55592)adds
spawn_throttleclass for bounded concurrency with stackful coroutines fromboost::asio::spawn(). this relies on new support for per-op cancellation to guarantee that the lifetime of child coroutines won't exceed the lifetime of their throttle, making it safe for children to access memory from their parent's stackby taking
optional_yieldin the constructor, it transparently supports both synchronous execution (where optional_yield is empty) and asynchronous execution within a stackful coroutine (where optional_yield contains the parent's yield_context)also adds a
max_concurrent_for_each()algorithm (inspired by seastar) to hide the use ofspawn_throttleShow available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e