]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/common/errorator: consider return value as ready future in maybe_handle_error_t
authorKefu Chai <kchai@redhat.com>
Wed, 23 Jun 2021 08:11:24 +0000 (16:11 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 23 Jun 2021 08:13:58 +0000 (16:13 +0800)
commitfd00aa96a4384b6a6581c6b26126d7ffbee6021a
treea73fa8b97337e60ff8e124cecbff12eaa552b11d
parent54e5339bf9a5e73e29d9c41a18ab9e828e36591b
crimson/common/errorator: consider return value as ready future in maybe_handle_error_t

this behavior mirrors seasetar::futurize::apply(), where non-future and
non-void return values are converted to future<>, and returned instead.
this change could simplify some use cases where we always return an
immediately available future.

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