From Jason Turner

[thread.sharedtimedmutex.requirements]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpfrgqgcvq/{from.md → to.md} +15 -9
tmp/tmpfrgqgcvq/{from.md → to.md} RENAMED
@@ -1,16 +1,22 @@
1
  #### Shared timed mutex types <a id="thread.sharedtimedmutex.requirements">[[thread.sharedtimedmutex.requirements]]</a>
2
 
 
 
3
  The standard library type `shared_timed_mutex` is a *shared timed mutex
4
  type*. Shared timed mutex types meet the requirements of timed mutex
5
  types [[thread.timedmutex.requirements]], shared mutex types
6
  [[thread.sharedmutex.requirements]], and additionally meet the
7
  requirements set out below. In this description, `m` denotes an object
8
- of a shared timed mutex type, `rel_type` denotes an object of an
9
  instantiation of `duration` [[time.duration]], and `abs_time` denotes an
10
  object of an instantiation of `time_point` [[time.point]].
11
 
 
 
 
 
12
  The expression `m.try_lock_shared_for(rel_time)` is well-formed and has
13
  the following semantics:
14
 
15
  *Preconditions:* The calling thread has no ownership of the mutex.
16
 
@@ -27,18 +33,18 @@ will be obtained if the lock is available, but implementations are
27
  expected to make a strong effort to do so. — *end note*]
28
 
29
  If an exception is thrown then a shared lock has not been acquired for
30
  the current thread.
31
 
32
- *Return type:* `bool`.
33
-
34
- *Returns:* `true` if the shared lock was acquired, `false` otherwise.
35
-
36
  *Synchronization:* If `try_lock_shared_for()` returns `true`, prior
37
  `unlock()` operations on the same object synchronize
38
  with [[intro.multithread]] this operation.
39
 
 
 
 
 
40
  *Throws:* Timeout-related exceptions [[thread.req.timing]].
41
 
42
  The expression `m.try_lock_shared_until(abs_time)` is well-formed and
43
  has the following semantics:
44
 
@@ -56,18 +62,18 @@ will be obtained if the lock is available, but implementations are
56
  expected to make a strong effort to do so. — *end note*]
57
 
58
  If an exception is thrown then a shared lock has not been acquired for
59
  the current thread.
60
 
61
- *Return type:* `bool`.
62
-
63
- *Returns:* `true` if the shared lock was acquired, `false` otherwise.
64
-
65
  *Synchronization:* If `try_lock_shared_until()` returns `true`, prior
66
  `unlock()` operations on the same object synchronize
67
  with [[intro.multithread]] this operation.
68
 
 
 
 
 
69
  *Throws:* Timeout-related exceptions [[thread.req.timing]].
70
 
71
  ##### Class `shared_timed_mutex` <a id="thread.sharedtimedmutex.class">[[thread.sharedtimedmutex.class]]</a>
72
 
73
  ``` cpp
 
1
  #### Shared timed mutex types <a id="thread.sharedtimedmutex.requirements">[[thread.sharedtimedmutex.requirements]]</a>
2
 
3
+ ##### General <a id="thread.sharedtimedmutex.requirements.general">[[thread.sharedtimedmutex.requirements.general]]</a>
4
+
5
  The standard library type `shared_timed_mutex` is a *shared timed mutex
6
  type*. Shared timed mutex types meet the requirements of timed mutex
7
  types [[thread.timedmutex.requirements]], shared mutex types
8
  [[thread.sharedmutex.requirements]], and additionally meet the
9
  requirements set out below. In this description, `m` denotes an object
10
+ of a shared timed mutex type, `rel_time` denotes an object of an
11
  instantiation of `duration` [[time.duration]], and `abs_time` denotes an
12
  object of an instantiation of `time_point` [[time.point]].
13
 
14
+ [*Note 1*: The shared timed mutex types meet the
15
+ *Cpp17SharedTimedLockable* requirements
16
+ [[thread.req.lockable.shared.timed]]. — *end note*]
17
+
18
  The expression `m.try_lock_shared_for(rel_time)` is well-formed and has
19
  the following semantics:
20
 
21
  *Preconditions:* The calling thread has no ownership of the mutex.
22
 
 
33
  expected to make a strong effort to do so. — *end note*]
34
 
35
  If an exception is thrown then a shared lock has not been acquired for
36
  the current thread.
37
 
 
 
 
 
38
  *Synchronization:* If `try_lock_shared_for()` returns `true`, prior
39
  `unlock()` operations on the same object synchronize
40
  with [[intro.multithread]] this operation.
41
 
42
+ *Return type:* `bool`.
43
+
44
+ *Returns:* `true` if the shared lock was acquired, otherwise `false`.
45
+
46
  *Throws:* Timeout-related exceptions [[thread.req.timing]].
47
 
48
  The expression `m.try_lock_shared_until(abs_time)` is well-formed and
49
  has the following semantics:
50
 
 
62
  expected to make a strong effort to do so. — *end note*]
63
 
64
  If an exception is thrown then a shared lock has not been acquired for
65
  the current thread.
66
 
 
 
 
 
67
  *Synchronization:* If `try_lock_shared_until()` returns `true`, prior
68
  `unlock()` operations on the same object synchronize
69
  with [[intro.multithread]] this operation.
70
 
71
+ *Return type:* `bool`.
72
+
73
+ *Returns:* `true` if the shared lock was acquired, otherwise `false`.
74
+
75
  *Throws:* Timeout-related exceptions [[thread.req.timing]].
76
 
77
  ##### Class `shared_timed_mutex` <a id="thread.sharedtimedmutex.class">[[thread.sharedtimedmutex.class]]</a>
78
 
79
  ``` cpp