std::unique...k::owns_lock(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

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 bool tests 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