About 41,700 results
Open links in new tab
  1. std::condition_variable::wait - cppreference.com

    Dec 20, 2024 · Notes The effects of notify_one() / notify_all() and each of the three atomic parts of wait() / wait_for() / wait_until() (unlock+wait, wakeup, and lock) take place in a single total order that can be …

  2. How do you add a timed delay to a C++ program? - Stack Overflow

    Sep 12, 2014 · 151 I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at? I wish I had more details on how I am …

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

    Feb 8, 2020 · Performs atomic waiting operations. Behaves as if it repeatedly performs the following steps: Compare the value representation of this->load(order) with that of old. If those are equal, then …

  4. std::condition_variable::wait_for - cppreference.com

    Sep 25, 2024 · The effects of notify_one () / notify_all () and each of the three atomic parts of wait () / wait_for () / wait_until () (unlock+wait, wakeup, and lock) take place in a single total order that can be …

  5. Is there a decent wait function in C++? - Stack Overflow

    May 24, 2009 · 26 The appearance and disappearance of a window for displaying text is a feature of how you are running the program, not of C++. Run in a persistent command line environment, or …

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

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

  7. std::condition_variable - cppreference.com

    Mar 4, 2024 · Call wait, wait_for, or wait_until on the std::condition_variable (atomically releases the mutex and suspends thread execution until the condition variable is notified, a timeout expires, or a …

  8. How to properly wait for condition variable in C++?

    Aug 16, 2022 · When processing is done, we wait for the condition variable. The idea is that the asynchronous handler should notify the condition variable. Unfortunately the notify seems to happen …

  9. c++ - What is the best way to wait a thread? - Stack Overflow

    Nov 7, 2019 · Sometimes you get the scenario where a thread needs to wait until it gets a signal from another thread. currently I achieve this in the following ways: (there is a volatile int signal; that is set ...

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

    Oct 23, 2023 · 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 delays. …