auto op = registry.create_operation<T>(std::forward<Args>(args)...);
crimson::get_logger(ceph_subsys_osd).info(
"PerShardState::{}, {}", __func__, *op);
- auto fut = op->start().finally([op /* by copy */] {
- // ensure the op's lifetime is appropriate. It is not enough to
- // guarantee it's alive at the scheduling stages (i.e. `then()`
- // calling) but also during the actual execution (i.e. when passed
- // lambdas are actually run).
+ auto fut = seastar::yield().then([op] {
+ return op->start().finally([op /* by copy */] {
+ // ensure the op's lifetime is appropriate. It is not enough to
+ // guarantee it's alive at the scheduling stages (i.e. `then()`
+ // calling) but also during the actual execution (i.e. when passed
+ // lambdas are actually run).
+ });
});
return std::make_pair(std::move(op), std::move(fut));
}