New paper: N3568, Shared locking in C++, Revision 1 -- Howard Hinnant

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 and upgrade_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 from shared_lock and upgrade_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.

Comments (0)

There are currently no comments on this entry.