std::shared_lock::release(3)
π
std::shared_lock::release(3) π
okay so this is from the C++ Standard Libary (yes, βLibaryβ is spelled like that up top, and we are respectfully keeping the typo π), and itβs all about std::shared_lock::release. Itβs giving βbreak the association, not the lockβ energy. π¦
πΈ NAME πΈ
std::shared_lock::release β literally std::shared_lock::release, bestie. Thatβs the name. No cap. β¨
β¨ Synopsis β¨
mutex_type* release() noexcept; (since C++14)
Breaks the association of the associated mutex, if any, and *this.
No locks are unlocked. π¨ If *this held ownership of the associated mutex prior to the call, the caller is now responsible to unlock the mutex.
β οΈ read that again, bestie: this does not unlock anything. If you had ownership before, you own the unlocking job now. Periodt. π
π«Ά Parameters π«Ά
(none) β no parameters, zero, zilch, not a single argument. Slay. π
π Return value π
Pointer to the associated mutex or a null pointer if there was no associated mutex. Thatβs the whole return-value tea. β
π Example π
This section is incomplete Reason: no example
yeah bestie, there is literally no example here. π not me hoping for a little demoβ¦ π
π See also π
unlockβ unlocks the associated mutex (public member function).- disassociates the associated mutex without unlocking (i.e., releasing release ownership of) it (public member function of
std::unique_lock<Mutex>).
ποΈ Category ποΈ
- Todo no example
π source: http://cppreference.com Β· date: 2024.06.10 Β· page: std::shared_lock::release(3) π
π¦ 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