New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wip cxx11concurrency #5931
Merged
Merged
Wip cxx11concurrency #5931
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
September 15, 2015 16:04
406d281
to
cb0bf0c
Compare
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
October 17, 2015 20:59
cb0bf0c
to
1864fa8
Compare
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
December 3, 2015 23:31
1864fa8
to
45a1f12
Compare
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
December 10, 2015 22:52
45a1f12
to
9834a8f
Compare
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
December 17, 2015 20:10
9834a8f
to
5342e0b
Compare
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
December 21, 2015 22:56
5342e0b
to
fcd345f
Compare
cbodley
referenced
this pull request
in cbodley/ceph
Jan 12, 2016
Signed-off-by: Casey Bodley <cbodley@redhat.com>
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
February 4, 2016 22:41
fcd345f
to
38d717e
Compare
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
February 5, 2016 18:52
38d717e
to
b52dcea
Compare
Locker class tracking shared/unique/unlocked state of SharedMutex concept. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
February 5, 2016 20:59
b52dcea
to
ea558e6
Compare
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>
adamemerson
force-pushed
the
wip-cxx11concurrency
branch
from
February 5, 2016 22:08
ea558e6
to
f4b083a
Compare
liewegas
added a commit
that referenced
this pull request
Feb 8, 2016
librados: move to c++11 concurrency types Reviewed-by: Matt Benjamin <mbenjami@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes implementations of the SharedMutex and SharedTimedMutex concepts (with debugging implementations), debugging implementations of the Mutex concept, an implementation of shared_lock, and a shunique_lock implementation managing shared and unique lock state.
We also modify OSDC to use C++ style locking as a demonstration.
(And replace get_osdmap_read/put_osdmap_read with with_osdmap, which is a bit more lock-safe.)