]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/asok: do not assume the order of param eval
authorKefu Chai <kchai@redhat.com>
Sun, 16 Feb 2020 08:40:04 +0000 (16:40 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 16 Feb 2020 15:59:30 +0000 (23:59 +0800)
commit7d1181b91501b1556e2bfdce8029cadf6aad624e
treecbf6ddefd40bf0ca1395aff72c5e833b6ec4f0b2
parentdab8788f281f999c9f27ae9457998be96261d5b0
crimson/asok: do not assume the order of param eval

* do not assume the order of parameter evaluation, before this change,
  we have `do_with(cn.input(), cn.output(), std::move(cn) ...)`, see
  https://en.cppreference.com/w/cpp/language/eval_order,
> side effects of the initialization of every parameter are
> indeterminately sequenced with respect to value computations and side
> effects of any other parameter.
  we cannot move `cn` out and then call its member functions. so
  introduce a struct for capturing its input and output.
* move `do_until_gate()` into `start()`, no need to check if
  gate is stopped in `safe_action`, as `sestar::do_until()` will do
  this for us.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/admin/admin_socket.cc
src/crimson/admin/admin_socket.h