std::timed_mutex(3)
π NAME π
std::timed_mutex β bestie, it's the standard timed mutex type π°οΈβ¨
(also hi, this is a page from the Library Functions Manual, we're in libstdc++ land π )
β¨ SYNOPSIS β¨
#include <mutex>
π Public Types π
typedef __native_type * native_handle_typeβ the native handle type, aka the lil pointer to the underlying native thingie π«Ά
π Public Member Functions π
timed_mutex (const timed_mutex &)=deleteβ copy constructor? deleted, no copies allowed, she's one of a kind πvoid lock ()β takes the lock. periodt πnative_handle_type native_handle () noexceptβ hands you back the native handle,noexceptso she won't throw at you πtimed_mutex & operator= (const timed_mutex &)=deleteβ assignment operator? also deleted, not me being assignable πbool try_lock () noexceptβ tries to take the lock,noexcept, tells you yes or no βtemplate<class _Rep, class _Period> bool try_lock_for (const chrono::duration< _Rep, _Period > &__rtime)β tries for a duration of time, template-y and chrono-flavored β³template<class _Clock, class _Duration> bool try_lock_until (const chrono::time_point< _Clock, _Duration > &__atime)β tries until a specific time point, with a clock and everything πvoid unlock ()β releases the lock, ty for your service π«‘
π«Ά Friends π«Ά
class __timed_mutex_impl< timed_mutex >β yes she has friends, this one is lowkey the implementation bestie π€
π DETAILED DESCRIPTION π
Okay so, the standard timed mutex type. That's her.
A non-recursive mutex that supports a timeout when trying to acquire the lock. So like β she's not the kind of girl who lets you lock her twice from the same thread (non-recursive, remember that bestie), but she is the kind who'll let you say "okay I'll wait but only for this long" π
π¦ And yes, the timeout thing is the whole vibe. No timeout, no timed_mutex. That's the point.
Since: C++11 β she's been iconic since C++11 π
π AUTHOR π
Generated automatically by Doxygen for libstdc++ from the source code. (not a human author, just a robot doing her lil thing π€β¨)
okay that's the whole page bestie, no cap, every flag and signature intact π«Ά this was std::timed_mutex(3) from libstdc++, the Library Functions Manual β go forth and lock responsibly, mwah πππ¦
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· 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 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· 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