|
2162 | 2162 | \effects
|
2163 | 2163 | Blocks the calling thread until ownership of the mutex can be obtained for the calling thread.
|
2164 | 2164 |
|
| 2165 | +\pnum |
| 2166 | +\sync |
| 2167 | +Prior \tcode{unlock()} operations on the same object |
| 2168 | +\term{synchronize with}\iref{intro.multithread} this operation. |
| 2169 | + |
2165 | 2170 | \pnum
|
2166 | 2171 | \ensures
|
2167 | 2172 | The calling thread owns the mutex.
|
2168 | 2173 |
|
2169 | 2174 | \pnum
|
2170 | 2175 | \returntype \tcode{void}.
|
2171 | 2176 |
|
2172 |
| -\pnum |
2173 |
| -\sync |
2174 |
| -Prior \tcode{unlock()} operations on the same object |
2175 |
| -\term{synchronize with}\iref{intro.multithread} this operation. |
2176 |
| - |
2177 | 2177 | \pnum
|
2178 | 2178 | \throws
|
2179 | 2179 | \tcode{system_error} when
|
|
2214 | 2214 | An implementation should ensure that \tcode{try_lock()} does not consistently return \tcode{false}
|
2215 | 2215 | in the absence of contending mutex acquisitions.
|
2216 | 2216 |
|
2217 |
| -\pnum |
2218 |
| -\returntype \tcode{bool}. |
2219 |
| - |
2220 |
| -\pnum |
2221 |
| -\returns |
2222 |
| -\tcode{true} if ownership was obtained, otherwise \tcode{false}. |
2223 |
| - |
2224 | 2217 | \pnum
|
2225 | 2218 | \sync
|
2226 | 2219 | If \tcode{try_lock()} returns \tcode{true}, prior \tcode{unlock()} operations
|
|
2231 | 2224 | known about the state after a failure, even in the absence of spurious failures.
|
2232 | 2225 | \end{note}
|
2233 | 2226 |
|
| 2227 | +\pnum |
| 2228 | +\returntype \tcode{bool}. |
| 2229 | + |
| 2230 | +\pnum |
| 2231 | +\returns |
| 2232 | +\tcode{true} if ownership was obtained, otherwise \tcode{false}. |
| 2233 | + |
2234 | 2234 | \pnum
|
2235 | 2235 | \throws
|
2236 | 2236 | Nothing.
|
|
2415 | 2415 | lock is available, but implementations are expected to make a strong effort to do so.
|
2416 | 2416 | \end{note}
|
2417 | 2417 |
|
| 2418 | +\pnum |
| 2419 | +\sync |
| 2420 | +If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations |
| 2421 | +on the same object \term{synchronize with}\iref{intro.multithread} this operation. |
| 2422 | + |
2418 | 2423 | \pnum
|
2419 | 2424 | \returntype \tcode{bool}.
|
2420 | 2425 |
|
2421 | 2426 | \pnum
|
2422 | 2427 | \returns
|
2423 | 2428 | \tcode{true} if ownership was obtained, otherwise \tcode{false}.
|
2424 | 2429 |
|
2425 |
| -\pnum |
2426 |
| -\sync |
2427 |
| -If \tcode{try_lock_for()} returns \tcode{true}, prior \tcode{unlock()} operations |
2428 |
| -on the same object \term{synchronize with}\iref{intro.multithread} this operation. |
2429 |
| - |
2430 | 2430 | \pnum
|
2431 | 2431 | \throws
|
2432 | 2432 | Timeout-related exceptions\iref{thread.req.timing}.
|
|
2456 | 2456 | strong effort to do so.
|
2457 | 2457 | \end{note}
|
2458 | 2458 |
|
| 2459 | +\pnum |
| 2460 | +\sync |
| 2461 | +If \tcode{try_lock_until()} returns \tcode{true}, prior \tcode{unlock()} |
| 2462 | +operations on the same object \term{synchronize with}\iref{intro.multithread} |
| 2463 | +this operation. |
| 2464 | + |
2459 | 2465 | \pnum
|
2460 | 2466 | \returntype \tcode{bool}.
|
2461 | 2467 |
|
2462 | 2468 | \pnum
|
2463 | 2469 | \returns
|
2464 | 2470 | \tcode{true} if ownership was obtained, otherwise \tcode{false}.
|
2465 | 2471 |
|
2466 |
| -\pnum |
2467 |
| -\sync |
2468 |
| -If \tcode{try_lock_until()} returns \tcode{true}, prior \tcode{unlock()} |
2469 |
| -operations on the same object \term{synchronize with}\iref{intro.multithread} |
2470 |
| -this operation. |
2471 |
| - |
2472 | 2472 | \pnum
|
2473 | 2473 | \throws
|
2474 | 2474 | Timeout-related exceptions\iref{thread.req.timing}.
|
|
2634 | 2634 | Blocks the calling thread until shared ownership of the mutex can be obtained for the calling thread.
|
2635 | 2635 | If an exception is thrown then a shared lock has not been acquired for the current thread.
|
2636 | 2636 |
|
| 2637 | +\pnum |
| 2638 | +\sync |
| 2639 | +Prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation. |
| 2640 | + |
2637 | 2641 | \pnum
|
2638 | 2642 | \ensures
|
2639 | 2643 | The calling thread has a shared lock on the mutex.
|
2640 | 2644 |
|
2641 | 2645 | \pnum
|
2642 | 2646 | \returntype \tcode{void}.
|
2643 | 2647 |
|
2644 |
| -\pnum |
2645 |
| -\sync |
2646 |
| -Prior \tcode{unlock()} operations on the same object synchronize with\iref{intro.multithread} this operation. |
2647 |
| - |
2648 | 2648 | \pnum
|
2649 | 2649 | \throws
|
2650 | 2650 | \tcode{system_error} when an exception is required\iref{thread.req.exception}.
|
|
2697 | 2697 | effect and \tcode{try_lock_shared()} immediately returns. An implementation
|
2698 | 2698 | may fail to obtain the lock even if it is not held by any other thread.
|
2699 | 2699 |
|
| 2700 | +\pnum |
| 2701 | +\sync |
| 2702 | +If \tcode{try_lock_shared()} returns \tcode{true}, prior \tcode{unlock()} |
| 2703 | +operations on the same object synchronize with\iref{intro.multithread} this |
| 2704 | +operation. |
| 2705 | + |
2700 | 2706 | \pnum
|
2701 | 2707 | \returntype \tcode{bool}.
|
2702 | 2708 |
|
2703 | 2709 | \pnum
|
2704 | 2710 | \returns
|
2705 | 2711 | \tcode{true} if the shared lock was acquired, otherwise \tcode{false}.
|
2706 | 2712 |
|
2707 |
| -\pnum |
2708 |
| -\sync |
2709 |
| -If \tcode{try_lock_shared()} returns \tcode{true}, prior \tcode{unlock()} |
2710 |
| -operations on the same object synchronize with\iref{intro.multithread} this |
2711 |
| -operation. |
2712 |
| - |
2713 | 2713 | \pnum
|
2714 | 2714 | \throws
|
2715 | 2715 | Nothing.
|
|
2811 | 2811 | If an exception is thrown then a shared lock has not been acquired for
|
2812 | 2812 | the current thread.
|
2813 | 2813 |
|
| 2814 | +\pnum |
| 2815 | +\sync |
| 2816 | +If \tcode{try_lock_shared_for()} returns \tcode{true}, prior |
| 2817 | +\tcode{unlock()} operations on the same object synchronize |
| 2818 | +with\iref{intro.multithread} this operation. |
| 2819 | + |
2814 | 2820 | \pnum
|
2815 | 2821 | \returntype \tcode{bool}.
|
2816 | 2822 |
|
2817 | 2823 | \pnum
|
2818 | 2824 | \returns
|
2819 | 2825 | \tcode{true} if the shared lock was acquired, otherwise \tcode{false}.
|
2820 | 2826 |
|
2821 |
| -\pnum |
2822 |
| -\sync |
2823 |
| -If \tcode{try_lock_shared_for()} returns \tcode{true}, prior |
2824 |
| -\tcode{unlock()} operations on the same object synchronize |
2825 |
| -with\iref{intro.multithread} this operation. |
2826 |
| - |
2827 | 2827 | \pnum
|
2828 | 2828 | \throws
|
2829 | 2829 | Timeout-related exceptions\iref{thread.req.timing}.
|
|
2854 | 2854 | If an exception is thrown then a shared lock has not been acquired for
|
2855 | 2855 | the current thread.
|
2856 | 2856 |
|
| 2857 | +\pnum |
| 2858 | +\sync |
| 2859 | +If \tcode{try_lock_shared_until()} returns \tcode{true}, prior |
| 2860 | +\tcode{unlock()} operations on the same object synchronize |
| 2861 | +with\iref{intro.multithread} this operation. |
| 2862 | + |
2857 | 2863 | \pnum
|
2858 | 2864 | \returntype \tcode{bool}.
|
2859 | 2865 |
|
2860 | 2866 | \pnum
|
2861 | 2867 | \returns
|
2862 | 2868 | \tcode{true} if the shared lock was acquired, otherwise \tcode{false}.
|
2863 | 2869 |
|
2864 |
| -\pnum |
2865 |
| -\sync |
2866 |
| -If \tcode{try_lock_shared_until()} returns \tcode{true}, prior |
2867 |
| -\tcode{unlock()} operations on the same object synchronize |
2868 |
| -with\iref{intro.multithread} this operation. |
2869 |
| - |
2870 | 2870 | \pnum
|
2871 | 2871 | \throws
|
2872 | 2872 | Timeout-related exceptions\iref{thread.req.timing}.
|
|
6363 | 6363 | \end{itemdecl}
|
6364 | 6364 |
|
6365 | 6365 | \begin{itemdescr}
|
6366 |
| -\pnum |
6367 |
| -\returns |
6368 |
| -A \tcode{future<R>} object with the same shared state as |
6369 |
| -\tcode{*this}. |
6370 |
| - |
6371 | 6366 | \pnum
|
6372 | 6367 | \sync
|
6373 | 6368 | Calls to this function do not introduce
|
|
6380 | 6375 | Such calls need not synchronize with each other.
|
6381 | 6376 | \end{note}
|
6382 | 6377 |
|
| 6378 | +\pnum |
| 6379 | +\returns |
| 6380 | +A \tcode{future<R>} object with the same shared state as |
| 6381 | +\tcode{*this}. |
| 6382 | + |
6383 | 6383 | \pnum
|
6384 | 6384 | \throws
|
6385 | 6385 | \tcode{future_error} if \tcode{*this} has no shared state or if
|
|
7275 | 7275 | in this document nor by the implementation, the behavior is undefined.
|
7276 | 7276 | \end{itemize}
|
7277 | 7277 |
|
7278 |
| -\pnum |
7279 |
| -\returns |
7280 |
| -An object of type |
7281 |
| -\tcode{future<invoke_result_t<decay_t<F>, decay_t<Args>...>>} that refers |
7282 |
| -to the shared state created by this call to \tcode{async}. |
7283 |
| -\begin{note} |
7284 |
| -If a future obtained from \tcode{async} is moved outside the local scope, |
7285 |
| -the future's destructor can block for the shared state to become ready. |
7286 |
| -\end{note} |
7287 |
| - |
7288 | 7278 | \pnum
|
7289 | 7279 | \sync
|
7290 | 7280 | The invocation of \tcode{async} synchronizes with the invocation of \tcode{f}.
|
|
7315 | 7305 | happens first.
|
7316 | 7306 | \end{itemize}
|
7317 | 7307 |
|
| 7308 | +\pnum |
| 7309 | +\returns |
| 7310 | +An object of type |
| 7311 | +\tcode{future<invoke_result_t<decay_t<F>, decay_t<Args>...>>} that refers |
| 7312 | +to the shared state created by this call to \tcode{async}. |
| 7313 | +\begin{note} |
| 7314 | +If a future obtained from \tcode{async} is moved outside the local scope, |
| 7315 | +the future's destructor can block for the shared state to become ready. |
| 7316 | +\end{note} |
| 7317 | + |
7318 | 7318 | \pnum
|
7319 | 7319 | \throws
|
7320 | 7320 | \tcode{system_error} if \tcode{policy == launch::async} and the
|
|
7551 | 7551 | \end{itemdecl}
|
7552 | 7552 |
|
7553 | 7553 | \begin{itemdescr}
|
7554 |
| -\pnum |
7555 |
| -\returns |
7556 |
| -A \tcode{future} object that shares the same shared state as \tcode{*this}. |
7557 |
| - |
7558 | 7554 | \pnum
|
7559 | 7555 | \sync
|
7560 | 7556 | Calls to this function do not introduce
|
|
7565 | 7561 | Such calls need not synchronize with each other.
|
7566 | 7562 | \end{note}
|
7567 | 7563 |
|
| 7564 | +\pnum |
| 7565 | +\returns |
| 7566 | +A \tcode{future} object that shares the same shared state as \tcode{*this}. |
| 7567 | + |
7568 | 7568 | \pnum
|
7569 | 7569 | \throws
|
7570 | 7570 | A \tcode{future_error} object if an error occurs.
|
|
0 commit comments