]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osdc: Update to use C++11 concurrency 5931/head
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 14 Sep 2015 17:35:10 +0000 (13:35 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 5 Feb 2016 22:07:28 +0000 (17:07 -0500)
commitf4b083a5e3a7727c097ae8be0bb39bae9e6723a5
treed05aa50e4f8ed86ebcd04663a672a2bed02faabb
parentc1b3138f2ec432daeb005130ce465cd11a3258bc
osdc: Update to use C++11 concurrency

The only externally visible change is that Objecter::get_osdmap_read
and Objedcter::put_osdmap_read have been removed in favor of
Objecter::with_osdmap.

It can be used like:

objecter->with_osdmap([&](const OSDMap& o) { o.do_stuff(); };
int x = objecter->with_osdmap([&](const OSDMap& o) {
    return get_thing(id); });
objecter->with_osdmap(std::mem_fn(&OSDMap::do_stuff));
int x = objecter->with_osdmap(std::mem_fn(&OSDMap::get_thing),
                              id);

The choice between the style of the first two examples or the second two
is arbitrary and depends on what you prefer.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
16 files changed:
src/client/Client.cc
src/client/SyntheticClient.cc
src/librados/RadosClient.cc
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc
src/mds/Server.cc
src/mds/Server.h
src/mds/SnapServer.cc
src/mds/StrayManager.cc
src/msg/Dispatcher.h
src/osdc/Filer.cc
src/osdc/Filer.h
src/osdc/Journaler.cc
src/osdc/Journaler.h
src/osdc/Objecter.cc
src/osdc/Objecter.h