std::recursive_mutex(3cxx)
NAME
std::recursive_mutex β the standard recursive mutex type, and yes this is the 3cxx manual page, bestie. π
SYNOPSIS
#include <mutex>
Inherits __recursive_mutex_base. (so it's got that base class energy, periodt)
Public Types
typedef __native_type * native_handle_typeβ the native handle type, lowkey your backstage pass to the underlying handle, iykyk. ποΈ
Public Member Functions
recursive_mutex (const recursive_mutex &)=deleteβ copy constructor? deleted. not today, satan. πvoid lock ()β locks the mutex. and if you're the same thread, you can do it again, no cap. πnative_handle_type native_handle () noexceptβ returns the native handle. it'snoexcept, so it's giving reliable. β¨recursive_mutex & operator= (const recursive_mutex &)=deleteβ copy assignment? also deleted. we don't do that here. πbool try_lock () noexceptβ tries to lock it, returns a bool.noexcept, so no drama. πvoid unlock ()β unlocks. you gotta do it as many times as you locked it, fr fr. π
Detailed Description
Okay so a recursive mutex is literally the standard recursive mutex type. A recursive mutex can be locked more than once by the same thread. Other threads cannot lock the mutex until the owning thread unlocks it as many times as it was locked. That's the whole vibe. π
warning: the copy constructor and copy assignment are =delete, so no copying. it's giving exclusive. π«
Since
C++11. so it's been iconic since 2011, we love a legacy queen. π
Author
Generated automatically by Doxygen for libstdc++ from the source code. no cap, the robots did this one. π€
this page is brought to you by libstdc++ and the manual page std::recursive_mutex(3cxx). it's giving documentation realness. πβ¨
π¦ 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