std::unique...k::owns_lock(3)
okay bestie, welcome to std::unique...k::owns_lock(3), fresh from the C++ Standard Libary manual β¨ this one is short, iconic, and lowkey exactly what it says on the tin π
π NAME π
std::unique_lock::owns_lock β std::unique_lock::owns_lock π«Ά literally the function and the page name matching each other, periodt.
π¦ Synopsis π¦
bool owns_lock() const noexcept; (since C++11)
So yes bestie, itβs been serving since C++11 π and it checks whether *this owns a locked mutex or not. thatβs the whole vibe check π
πΈ Parameters πΈ
(none) β not a single argument, not even one π she takes nothing and keeps it cute.
π Return value π
Returns true if *this has an associated mutex and has acquired ownership of it, and false otherwise. no cap, thatβs the whole answer πβ¨
π«Ά See also π«Ά
operator booltests whether the lock owns (i.e., has locked) its associated mutex β public member function π₯
okay thatβs the page, bestie π§ this cutie came from http://cppreference.com, dated 2024.06.10, with the footer title std::unique...k::owns_lock(3) β slay and goodbye ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms