tmp/tmpaquz2m8z/{from.md → to.md}
RENAMED
|
@@ -8,13 +8,10 @@ shared_lock() noexcept;
|
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
explicit shared_lock(mutex_type& m);
|
| 11 |
```
|
| 12 |
|
| 13 |
-
*Preconditions:* The calling thread does not own the mutex for any
|
| 14 |
-
ownership mode.
|
| 15 |
-
|
| 16 |
*Effects:* Calls `m.lock_shared()`.
|
| 17 |
|
| 18 |
*Ensures:* `pm == addressof(m)` and `owns == true`.
|
| 19 |
|
| 20 |
``` cpp
|
|
@@ -25,34 +22,31 @@ shared_lock(mutex_type& m, defer_lock_t) noexcept;
|
|
| 25 |
|
| 26 |
``` cpp
|
| 27 |
shared_lock(mutex_type& m, try_to_lock_t);
|
| 28 |
```
|
| 29 |
|
| 30 |
-
*Preconditions:* The calling thread does not own the mutex for any
|
| 31 |
-
ownership mode.
|
| 32 |
-
|
| 33 |
*Effects:* Calls `m.try_lock_shared()`.
|
| 34 |
|
| 35 |
*Ensures:* `pm == addressof(m)` and `owns == res` where `res` is the
|
| 36 |
value returned by the call to `m.try_lock_shared()`.
|
| 37 |
|
| 38 |
``` cpp
|
| 39 |
shared_lock(mutex_type& m, adopt_lock_t);
|
| 40 |
```
|
| 41 |
|
| 42 |
-
*Preconditions:* The calling thread
|
| 43 |
|
| 44 |
*Ensures:* `pm == addressof(m)` and `owns == true`.
|
| 45 |
|
| 46 |
``` cpp
|
| 47 |
template<class Clock, class Duration>
|
| 48 |
shared_lock(mutex_type& m,
|
| 49 |
const chrono::time_point<Clock, Duration>& abs_time);
|
| 50 |
```
|
| 51 |
|
| 52 |
-
*Preconditions:*
|
| 53 |
-
|
| 54 |
|
| 55 |
*Effects:* Calls `m.try_lock_shared_until(abs_time)`.
|
| 56 |
|
| 57 |
*Ensures:* `pm == addressof(m)` and `owns == res` where `res` is the
|
| 58 |
value returned by the call to `m.try_lock_shared_until(abs_time)`.
|
|
@@ -61,12 +55,12 @@ value returned by the call to `m.try_lock_shared_until(abs_time)`.
|
|
| 61 |
template<class Rep, class Period>
|
| 62 |
shared_lock(mutex_type& m,
|
| 63 |
const chrono::duration<Rep, Period>& rel_time);
|
| 64 |
```
|
| 65 |
|
| 66 |
-
*Preconditions:*
|
| 67 |
-
|
| 68 |
|
| 69 |
*Effects:* Calls `m.try_lock_shared_for(rel_time)`.
|
| 70 |
|
| 71 |
*Ensures:* `pm == addressof(m)` and `owns == res` where `res` is the
|
| 72 |
value returned by the call to `m.try_lock_shared_for(rel_time)`.
|
|
|
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
explicit shared_lock(mutex_type& m);
|
| 11 |
```
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
*Effects:* Calls `m.lock_shared()`.
|
| 14 |
|
| 15 |
*Ensures:* `pm == addressof(m)` and `owns == true`.
|
| 16 |
|
| 17 |
``` cpp
|
|
|
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
shared_lock(mutex_type& m, try_to_lock_t);
|
| 25 |
```
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
*Effects:* Calls `m.try_lock_shared()`.
|
| 28 |
|
| 29 |
*Ensures:* `pm == addressof(m)` and `owns == res` where `res` is the
|
| 30 |
value returned by the call to `m.try_lock_shared()`.
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
shared_lock(mutex_type& m, adopt_lock_t);
|
| 34 |
```
|
| 35 |
|
| 36 |
+
*Preconditions:* The calling thread holds a shared lock on `m`.
|
| 37 |
|
| 38 |
*Ensures:* `pm == addressof(m)` and `owns == true`.
|
| 39 |
|
| 40 |
``` cpp
|
| 41 |
template<class Clock, class Duration>
|
| 42 |
shared_lock(mutex_type& m,
|
| 43 |
const chrono::time_point<Clock, Duration>& abs_time);
|
| 44 |
```
|
| 45 |
|
| 46 |
+
*Preconditions:* `Mutex` meets the *Cpp17SharedTimedLockable*
|
| 47 |
+
requirements [[thread.req.lockable.shared.timed]].
|
| 48 |
|
| 49 |
*Effects:* Calls `m.try_lock_shared_until(abs_time)`.
|
| 50 |
|
| 51 |
*Ensures:* `pm == addressof(m)` and `owns == res` where `res` is the
|
| 52 |
value returned by the call to `m.try_lock_shared_until(abs_time)`.
|
|
|
|
| 55 |
template<class Rep, class Period>
|
| 56 |
shared_lock(mutex_type& m,
|
| 57 |
const chrono::duration<Rep, Period>& rel_time);
|
| 58 |
```
|
| 59 |
|
| 60 |
+
*Preconditions:* `Mutex` meets the *Cpp17SharedTimedLockable*
|
| 61 |
+
requirements [[thread.req.lockable.shared.timed]].
|
| 62 |
|
| 63 |
*Effects:* Calls `m.try_lock_shared_for(rel_time)`.
|
| 64 |
|
| 65 |
*Ensures:* `pm == addressof(m)` and `owns == res` where `res` is the
|
| 66 |
value returned by the call to `m.try_lock_shared_for(rel_time)`.
|