约 89 个结果
在新选项卡中打开链接
  1. std::future - cppreference.com

    2024年3月12日 · The class template std::future provides a mechanism to access the result of asynchronous operations: An asynchronous operation (created via std::async, std::packaged_task, …

  2. std::future<T>::future - cppreference.com

    2023年10月22日 · 2) Move constructor. Constructs a std::future with the shared state of other using move semantics. After construction, other.valid() == false.

  3. std::future<T>::wait - cppreference.com

    2021年8月27日 · Blocks until the result becomes available. valid() == true after the call. The behavior is undefined if valid() == false before the call to this function.

  4. std::future<T>::get - cppreference.com

    2024年2月22日 · The get member function waits (by calling wait ()) until the shared state is ready, then retrieves the value stored in the shared state (if any). Right after calling this function, valid () is false. …

  5. Standard library header <future> (C++11) - cppreference.com

    2023年11月27日 · future (const future &) = delete; ~future (); future & operator =(const future &) = delete; future & operator =(future &&) noexcept; shared_future <R> share () noexcept; // retrieving …

  6. std::promise - cppreference.com

    2023年10月23日 · The promise is the "push" end of the promise-future communication channel: the operation that stores a value in the shared state synchronizes-with (as defined in std::memory_order) …

  7. std::future<T>::wait_until - cppreference.com

    2020年8月2日 · wait_until waits for a result to become available. It blocks until specified timeout_time has been reached or the result becomes available, whichever comes first. The return value indicates …

  8. Does cancelling a Future re-interrupt a thread? - Stack Overflow

    2025年7月8日 · 1. If a future's task has not already started then cancelling the future will prevent the task from ever starting, regardless of whether true or false was passed to cancel. 2. Cancelling an …

  9. Cannot build CMake project because "Compatibility with CMake < 3.5 …

    2025年3月25日 · In this case it does work. In general, it probably doesn't. I'm wondering how this break in backwards compatibility should in general be navigated. Perhaps installing a previous version of …

  10. Can't import annotations from __future__ - Stack Overflow

    2018年10月19日 · When running the statement from __future__ import annotations I get the following error: Traceback (most recent call last): File "/usr/lib/python3.5/py_compile.py ...