Skip to content
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

[mrpt::synch] Create lightweight (non-Boost) shared/unique/upgradable (read/write) locks #171

Closed
jlblancoc opened this issue Nov 26, 2015 · 4 comments

Comments

@jlblancoc
Copy link
Member

See: http://stackoverflow.com/a/244376/1631514

@jlblancoc jlblancoc added this to the Release 1.3.3 milestone Nov 26, 2015
@jolting
Copy link
Member

jolting commented Feb 15, 2016

unique locks are already supported by c++11
http://en.cppreference.com/w/cpp/thread/unique_lock

shared locks are supported by c++14 compilers. This might be a problem until c++14 is ubiquitous.
http://en.cppreference.com/w/cpp/thread/shared_lock

Unfortunately, upgradeable locks aren't supported, but
It's worth reading:
https://isocpp.org/blog/2013/04/n3659-shared-locking
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3568.html

Here is Howard's public domain version of an upgradeable lock if you need one.
https://github.com/HowardHinnant/upgrade_mutex

@jlblancoc
Copy link
Member Author

Again, thanks for the pointers!
The creation of non-C++11, non-boost classes in MRPT is intended to serve as a workaround until we definitively enforce the use of C++11/14 in MRPT 2.0.0 (See also: issue #66 )

@jlblancoc jlblancoc modified the milestones: Release 1.4.1, Release 1.4.0 Mar 29, 2016
@jlblancoc
Copy link
Member Author

Since the current codebase does not make use of these features, I think that it makes more sense to just drop this topic for "milestone 1.5.0" and just use native C++11/14 classes in "milestone 2.0.0".

So: closing this ticket.

@jolting
Copy link
Member

jolting commented Jul 15, 2016

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants