std::unique_lock::release(3)

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

πŸ’– std::unique_lock::release(3) πŸ’–

okay so bestie, welcome to the C++ Standard Libary page for std::unique_lock::release. yes, β€œLibary” β€” we keep the spelling, it’s giving legacy energy. 🫢 this one is short but highkey important, so pay attention.

🌸 NAME 🌸

std::unique_lock::release β€” std::unique_lock::release. that’s the whole name, no notes. πŸ’…

✨ Synopsis ✨

mutex_type* release() noexcept;  (since C++11)

ok so what does it do? it breaks the association between the associated mutex (if any) and *this. that’s the vibe. no cap.

No locks are unlocked. read that again bestie. If *this held ownership of the associated mutex prior to the call, the caller is now responsible to unlock the mutex. you’re the main character now, so act like it. πŸ‘‘

πŸŽ€ Parameters πŸŽ€

  • (none) β€” literally none, bestie. zero params. ✨

πŸ¦‹ Return value πŸ¦‹

  • Pointer to the associated mutex β€” or a null pointer if there was no associated mutex. that’s it. πŸŽ€

πŸ”₯ Example πŸ”₯

bestie. not me opening the example section and finding this:

This section is incomplete Reason: no example

so yeah, the example is not example-ing today. πŸ˜­πŸ’€

πŸ’œ See also πŸ’œ

  • unlock β€” unlocks (i.e., releases ownership of) the associated mutex (public member function). slay. πŸ’œ

⭐ Category ⭐

  • * Todo no example

and that’s the page, bestie. mwah πŸ’‹ β€” source/version: http://cppreference.com, date: 2024.06.10, page: std::unique_lock::release(3). bye! πŸ’–

πŸ“¦ where this page comes from