]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/common/test_fair_mutex: s/std::thread/std::async()/
authorKefu Chai <kchai@redhat.com>
Wed, 18 Aug 2021 06:06:55 +0000 (14:06 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 18 Aug 2021 06:10:59 +0000 (14:10 +0800)
commit4e35ac670bc75e3507777d4375bbbb0fea8533ba
tree7fa49c4459eb5121dac689ebb94a0b3bc00ae889
parent53065cad3f9ddd40abd8902badbc7021aff83cf3
test/common/test_fair_mutex: s/std::thread/std::async()/

for better readability, as we don't need to care about the details of
the executor. and the returned futures are blocked in their dtor as

> these actions will not block for the shared state to become ready,
> except that it may block if all of the following are true: the
> shared state was created by a call to std::async, the shared state
> is not yet ready, and this was the last reference to the shared state.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/common/test_fair_mutex.cc