STD::::CONDITION_VARIABLE_ANY(3)

πŸ“¦
version 15.3.1 Β· 3 versions
, in centos-stream 10, fedora 43

πŸ’– std::condition_variable_any(3) πŸ’–

okay bestie, welcome to the Library Functions Manual β€” yes that's the manual name, we're fancy now πŸ‘‘

This is the page for std::condition_variable_any β€” the condition variable that's not picky about which lock you bring. Lowkey iconic behavior. Let's get into it 🫢


🌸 NAME 🌸

std::condition_variable_any β€” condition_variable_any

that's it. that's the name. she said "my name is my name" πŸ’…


✨ SYNOPSIS ✨

#include <condition_variable>

πŸŽ€ Public Member Functions πŸŽ€

condition_variable_any (const condition_variable_any &)=delete
void notify_all () noexcept
void notify_one () noexcept
condition_variable_any & operator= (const condition_variable_any
    &)=delete
template<typename _Lock> void wait (_Lock &__lock)
template<typename _Lock, typename _Predicate> void wait (_Lock &__lock,
    _Predicate __p)
template<typename _Lock, typename _Rep, typename _Period> cv_status
    wait_for (_Lock &__lock, const chrono::duration< _Rep, _Period >
    &__rtime)
template<typename _Lock, typename _Rep, typename _Period, typename
    _Predicate> bool wait_for (_Lock &__lock, const chrono::duration<
    _Rep, _Period > &__rtime, _Predicate __p)
template<typename _Lock, typename _Clock, typename _Duration> cv_status
    wait_until (_Lock &__lock, const chrono::time_point< _Clock,
    _Duration > &__atime)
template<typename _Lock, typename _Clock, typename _Duration, typename
    _Predicate> bool wait_until (_Lock &__lock, const
    chrono::time_point< _Clock, _Duration > &__atime, _Predicate __p)

okay so real talk, the copy constructor and copy assignment are =delete β€” that means you literally cannot copy this thing, not even a little. no duplicating her, she's one of a kind fr fr 😀. and notify_all and notify_one are noexcept which is the chillest vibe possible β€” no throwing, just pure notification energy ✨.

The rest is all templates: wait, wait_for, wait_until β€” each of them comes in two flavors, a plain one and one with a _Predicate to keep looping until the thing you actually wanted is true. wait_for and wait_until hand you back a cv_status (unless you gave them a predicate, in which case you get a bool). iykyk πŸ¦‹


🌈 Detailed Description 🌈

condition_variable_any

she's the condition variable, she's _any, and she does not care what kind of lock you roll up with. main character energy, no cap πŸ‘‘


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for libstdc++ from the source code.

(shoutout to Doxygen for writing this one so i didn't have to, king behavior πŸ™ˆ)


and that's the whole page, bestie!! this came out of libstdc++ β€” the version stamped on the bottom is just std::condi...ariable_any(3) with libstdc++ on the left side, no date to be found anywhere, so consider this your sign-off: stay locked, stay notified, and never copy a condition_variable_any because the compiler WILL delete you right back πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘πŸŒˆβ­

πŸ“¦ where this page comes from
  • centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: libstdc++-docs 14.4.1-4.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.2.1-2.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.3.1-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms