]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/common: discard failure of finally() block
authorKefu Chai <kchai@redhat.com>
Sat, 19 Sep 2020 02:32:45 +0000 (10:32 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 19 Sep 2020 04:40:50 +0000 (12:40 +0800)
commit5fb318fd25bb00fe78ceb3a98cafa30a1971e43e
tree4c358e5937f1ec6ecc7bc599998663bd23607a1f
parent7eceaf45de798ffa79ed328706a0b0c86ae4e06e
crimson/common: discard failure of finally() block

instead of assuming that the function passed to finally() returns an
erroratorized future, in this change:

* s/safe_then/then_wrapped/ to handle the exception thrown by
  the finally function.
* specialize for the case where the finally function does not return
  a future, and just call it. note, in seastar's implementation of
  finally, `finally_body` is used for specializing these two cases.
* rename "future" to "result", for better readability.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/common/errorator.h