std::timed_mutex(3cxx)
π std::timed_mutex π
okay so bestie, welcome to the 3cxx manual page from libstdc++ β yes, the icon itself is std::timed_mutex, and we're getting into it. β¨
π NAME π
std::timed_mutex β that's the name, bestie. π
β¨ SYNOPSIS β¨
The include is literally:
#include <mutex>
and this one inherits __mutex_base, and __timed_mutex_impl< timed_mutex >. π¦
π Public Types π
native_handle_typeβ exact typedef tea:typedef __native_type * native_handle_type.
π¦ Public Member Functions π¦
Full signature stack, verbatim because we do not mess with code:
timed_mutex (const timed_mutex &)=delete
void lock ()
native_handle_type native_handle () noexcept
timed_mutex & operator= (const timed_mutex &)=delete
bool try_lock () noexcept
template<class _Rep , class _Period > bool try_lock_for (const
chrono::duration< _Rep, _Period > &__rtime)
template<class _Clock , class _Duration > bool try_lock_until (const
chrono::time_point< _Clock, _Duration > &__atime)
void unlock ()
Quick vibe check: the copy constructor timed_mutex (const timed_mutex &)=delete is deleted, and the assignment operator timed_mutex & operator= (const timed_mutex &)=delete is also deleted π. native_handle () and try_lock () are both noexcept. lock () and unlock () return void. The two template ones are try_lock_for with chrono::duration< _Rep, _Period > &__rtime and try_lock_until with chrono::time_point< _Clock, _Duration > &__atime. That's the whole roster. π«Ά
πΈ Friends πΈ
class __timed_mutex_impl< timed_mutex >β yup, that's the friend. iykyk. π
π Detailed Description π
The standard timed mutex type. It's giving main character energy in <mutex> land. β¨
A non-recursive mutex that supports a timeout when trying to acquire the lock. So yes, it's a mutex with a little patience timer built in for the trying-to-lock moment β no cap. π°οΈ
β Since β
C++11 β iconic since day one, bestie. π
π Author π
Not a mysterious human author, lol: Generated automatically by Doxygen for libstdc++ from the source code. π€π
okay bye bestie, cute sign-off time: this page is from libstdc++, manual page std::timed_mutex(3cxx), and the original footer does not print a date β so source/version: libstdc++; date: not listed. mwah πβ¨
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms