|
1231 | 1231 | timed_mutex(const timed_mutex&) = delete;
|
1232 | 1232 | timed_mutex& operator=(const timed_mutex&) = delete;
|
1233 | 1233 |
|
1234 |
| - void lock(); |
| 1234 | + void lock(); // blocking |
1235 | 1235 | bool try_lock();
|
1236 | 1236 | template <class Rep, class Period>
|
1237 | 1237 | bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
|
|
1281 | 1281 | recursive_timed_mutex(const recursive_timed_mutex&) = delete;
|
1282 | 1282 | recursive_timed_mutex& operator=(const recursive_timed_mutex&) = delete;
|
1283 | 1283 |
|
1284 |
| - void lock(); |
| 1284 | + void lock(); // blocking |
1285 | 1285 | bool try_lock() noexcept;
|
1286 | 1286 | template <class Rep, class Period>
|
1287 | 1287 | bool try_lock_for(const chrono::duration<Rep, Period>& rel_time);
|
|
1516 | 1516 |
|
1517 | 1517 | \begin{codeblock}
|
1518 | 1518 | namespace std {
|
1519 |
| - |
1520 |
| -class shared_timed_mutex { |
1521 |
| -public: |
1522 |
| - shared_timed_mutex(); |
1523 |
| - ~shared_timed_mutex(); |
1524 |
| - |
1525 |
| - shared_timed_mutex(const shared_timed_mutex&) = delete; |
1526 |
| - shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; |
1527 |
| - |
1528 |
| - // Exclusive ownership |
1529 |
| - void lock(); // blocking |
1530 |
| - bool try_lock(); |
1531 |
| - template <class Rep, class Period> |
1532 |
| - bool try_lock_for(const chrono::duration<Rep, Period>& rel_time); |
1533 |
| - template <class Clock, class Duration> |
1534 |
| - bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time); |
1535 |
| - void unlock(); |
1536 |
| - |
1537 |
| - // Shared ownership |
1538 |
| - void lock_shared(); // blocking |
1539 |
| - bool try_lock_shared(); |
1540 |
| - template <class Rep, class Period> |
1541 |
| - bool |
1542 |
| - try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time); |
1543 |
| - template <class Clock, class Duration> |
1544 |
| - bool |
1545 |
| - try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time); |
1546 |
| - void unlock_shared(); |
1547 |
| -}; |
1548 |
| - |
| 1519 | + class shared_timed_mutex { |
| 1520 | + public: |
| 1521 | + shared_timed_mutex(); |
| 1522 | + ~shared_timed_mutex(); |
| 1523 | + |
| 1524 | + shared_timed_mutex(const shared_timed_mutex&) = delete; |
| 1525 | + shared_timed_mutex& operator=(const shared_timed_mutex&) = delete; |
| 1526 | + |
| 1527 | + // Exclusive ownership |
| 1528 | + void lock(); // blocking |
| 1529 | + bool try_lock(); |
| 1530 | + template <class Rep, class Period> |
| 1531 | + bool try_lock_for(const chrono::duration<Rep, Period>& rel_time); |
| 1532 | + template <class Clock, class Duration> |
| 1533 | + bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time); |
| 1534 | + void unlock(); |
| 1535 | + |
| 1536 | + // Shared ownership |
| 1537 | + void lock_shared(); // blocking |
| 1538 | + bool try_lock_shared(); |
| 1539 | + template <class Rep, class Period> |
| 1540 | + bool |
| 1541 | + try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time); |
| 1542 | + template <class Clock, class Duration> |
| 1543 | + bool |
| 1544 | + try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time); |
| 1545 | + void unlock_shared(); |
| 1546 | + }; |
1549 | 1547 | }
|
1550 | 1548 | \end{codeblock}
|
1551 | 1549 |
|
|
0 commit comments