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

    2024年10月28日 · The function template std::async runs the function f asynchronously (potentially in a separate thread which might be a part of a thread pool) and returns a std::future that will eventually …

  2. std::promise - cppreference.com

    2023年10月23日 · The class template std::promise provides a facility to store a value or an exception that is later acquired asynchronously via a std::future object created by the std::promise object. Note …

  3. std::future - cppreference.com

    2024年3月12日 · An asynchronous operation (created via std::async, std::packaged_task, or std::promise) can provide a std::future object to the creator of that asynchronous operation. The …

  4. Coroutines (C++20) - cppreference.com

    2025年3月5日 · A coroutine is a function that can suspend execution to be resumed later. Coroutines are stackless: they suspend execution by returning to the caller, and the data that is required to …

  5. std::thread - cppreference.com

    2023年10月24日 · The class thread represents a single thread of execution. Threads allow multiple functions to execute concurrently. Threads begin execution immediately upon construction of the …

  6. std::this_thread::sleep_for - cppreference.com

    2023年10月23日 · Blocks the execution of the current thread for at least the specified sleep_duration. This function may block for longer than sleep_duration due to scheduling or resource contention …

  7. std::thread::detach - cppreference.com

    2021年6月3日 · Separates the thread of execution from the thread object, allowing execution to continue independently. Any allocated resources will be freed once the thread exits. After calling detach *this …

  8. std::condition_variable - cppreference.com

    2024年3月4日 · std::condition_variable is a synchronization primitive used with a std::mutex to block one or more threads until another thread both modifies a shared variable (the condition) and notifies the …

  9. std::unique_lock - cppreference.com

    2025年4月21日 · The class unique_lock is a general-purpose mutex ownership wrapper allowing deferred locking, time-constrained attempts at locking, recursive locking, transfer of lock ownership, …

  10. std:: atomic - cppreference.com

    2025年2月6日 · Each instantiation and full specialization of the std::atomic template defines an atomic type. If one thread writes to an atomic object while another thread reads from it, the behavior is well …