From Jason Turner

[thread.timedmutex.recursive]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp9fk2qrb4/{from.md → to.md} +11 -11
tmp/tmp9fk2qrb4/{from.md → to.md} RENAMED
@@ -16,12 +16,12 @@ namespace std {
16
  bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
17
  template<class Clock, class Duration>
18
  bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
19
  void unlock();
20
 
21
- using native_handle_type = implementation-defined; // See~[thread.req.native]
22
- native_handle_type native_handle(); // See~[thread.req.native]
23
  };
24
  }
25
  ```
26
 
27
  The class `recursive_timed_mutex` provides a recursive mutex with
@@ -30,26 +30,26 @@ exclusive ownership semantics. If one thread owns a
30
  ownership of that object will fail (for `try_lock()`) or block (for
31
  `lock()`, `try_lock_for()`, and `try_lock_until()`) until the owning
32
  thread has completely released ownership or the call to `try_lock_for()`
33
  or `try_lock_until()` times out (having failed to obtain ownership).
34
 
35
- The class `recursive_timed_mutex` shall satisfy all of the timed mutex
36
- requirements ([[thread.timedmutex.requirements]]). It shall be a
37
- standard-layout class (Clause  [[class]]).
38
 
39
  A thread that owns a `recursive_timed_mutex` object may acquire
40
  additional levels of ownership by calling `lock()`, `try_lock()`,
41
  `try_lock_for()`, or `try_lock_until()` on that object. It is
42
  unspecified how many levels of ownership may be acquired by a single
43
  thread. If a thread has already acquired the maximum level of ownership
44
  for a `recursive_timed_mutex` object, additional calls to `try_lock()`,
45
- `try_lock_for()`, or `try_lock_until()` shall fail, and additional calls
46
- to `lock()` shall throw an exception of type `system_error`. A thread
47
- shall call `unlock()` once for each level of ownership acquired by calls
48
- to `lock()`, `try_lock()`, `try_lock_for()`, and `try_lock_until()`.
49
- Only when all levels of ownership have been released may ownership of
50
- the object be acquired by another thread.
51
 
52
  The behavior of a program is undefined if:
53
 
54
  - it destroys a `recursive_timed_mutex` object owned by any thread, or
55
  - a thread terminates while owning a `recursive_timed_mutex` object.
 
16
  bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
17
  template<class Clock, class Duration>
18
  bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time);
19
  void unlock();
20
 
21
+ using native_handle_type = implementation-defined; // see~[thread.req.native]
22
+ native_handle_type native_handle(); // see~[thread.req.native]
23
  };
24
  }
25
  ```
26
 
27
  The class `recursive_timed_mutex` provides a recursive mutex with
 
30
  ownership of that object will fail (for `try_lock()`) or block (for
31
  `lock()`, `try_lock_for()`, and `try_lock_until()`) until the owning
32
  thread has completely released ownership or the call to `try_lock_for()`
33
  or `try_lock_until()` times out (having failed to obtain ownership).
34
 
35
+ The class `recursive_timed_mutex` meets all of the timed mutex
36
+ requirements [[thread.timedmutex.requirements]]. It is a standard-layout
37
+ class [[class.prop]].
38
 
39
  A thread that owns a `recursive_timed_mutex` object may acquire
40
  additional levels of ownership by calling `lock()`, `try_lock()`,
41
  `try_lock_for()`, or `try_lock_until()` on that object. It is
42
  unspecified how many levels of ownership may be acquired by a single
43
  thread. If a thread has already acquired the maximum level of ownership
44
  for a `recursive_timed_mutex` object, additional calls to `try_lock()`,
45
+ `try_lock_for()`, or `try_lock_until()` fail, and additional calls to
46
+ `lock()` throw an exception of type `system_error`. A thread shall call
47
+ `unlock()` once for each level of ownership acquired by calls to
48
+ `lock()`, `try_lock()`, `try_lock_for()`, and `try_lock_until()`. Only
49
+ when all levels of ownership have been released may ownership of the
50
+ object be acquired by another thread.
51
 
52
  The behavior of a program is undefined if:
53
 
54
  - it destroys a `recursive_timed_mutex` object owned by any thread, or
55
  - a thread terminates while owning a `recursive_timed_mutex` object.