tmp/tmpy84mkltl/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
### Class template `counting_semaphore` <a id="thread.sema.cnt">[[thread.sema.cnt]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
-
template<ptrdiff_t least_max_value = implementation-defined>
|
| 6 |
class counting_semaphore {
|
| 7 |
public:
|
| 8 |
static constexpr ptrdiff_t max() noexcept;
|
| 9 |
|
| 10 |
constexpr explicit counting_semaphore(ptrdiff_t desired);
|
|
@@ -99,11 +99,11 @@ return `false` in the absence of contending semaphore operations.
|
|
| 99 |
void acquire();
|
| 100 |
```
|
| 101 |
|
| 102 |
*Effects:* Repeatedly performs the following steps, in order:
|
| 103 |
|
| 104 |
-
- Evaluates `try_acquire`. If the result is `true`, returns.
|
| 105 |
- Blocks on `*this` until `counter` is greater than zero.
|
| 106 |
|
| 107 |
*Throws:* `system_error` when an exception is
|
| 108 |
required [[thread.req.exception]].
|
| 109 |
|
|
|
|
| 1 |
### Class template `counting_semaphore` <a id="thread.sema.cnt">[[thread.sema.cnt]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
+
template<ptrdiff_t least_max_value = implementation-defined // default value for least_max_value template parameter of counting_semaphore>
|
| 6 |
class counting_semaphore {
|
| 7 |
public:
|
| 8 |
static constexpr ptrdiff_t max() noexcept;
|
| 9 |
|
| 10 |
constexpr explicit counting_semaphore(ptrdiff_t desired);
|
|
|
|
| 99 |
void acquire();
|
| 100 |
```
|
| 101 |
|
| 102 |
*Effects:* Repeatedly performs the following steps, in order:
|
| 103 |
|
| 104 |
+
- Evaluates `try_acquire()`. If the result is `true`, returns.
|
| 105 |
- Blocks on `*this` until `counter` is greater than zero.
|
| 106 |
|
| 107 |
*Throws:* `system_error` when an exception is
|
| 108 |
required [[thread.req.exception]].
|
| 109 |
|