A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N3568
Date: 2013-03-11
Shared locking in C++, Revision 1
by Howard Hinnant
Excerpt:
N3427 was presented at the Fall 2012 meeting in Portland to SG1 (Concurrency and Parallelism). The only objection at that meeting was to not allowing spurious failure for the try and timed locking and conversion locking functions of
shared_mutex
andupgrade_mutex
.Changes compared to N3427: The remarks about disallowing spurious failures have been removed.
...
This proposal adds functionality to allow clients to easily code the well-known multiple-readers / single-writer locking pattern.
This proposal adds:1. Seven constructors to
unique_lock<Mutex>
. These constructors serve as explicit try and timed conversions fromshared_lock
andupgrade_lock
.2. A new header:
<shared_mutex>
, containing:
class shared_mutex;
class upgrade_mutex;
template <class Mutex> class shared_lock;
template <class Mutex> class upgrade_lock;
Add a Comment
Comments are closed.