std::shared_lock::unlock(3)
π NAME π β std::shared_lock::unlock(3) from the C++ Standard Libary manual
okay so bestie, welcome to the page for std::shared_lock::unlock β yes, the shared-lock unlock function, and it is literally the βlet go of the shared lockβ moment. Main character energy for your mutex, honestly. π
πΈ Synopsis πΈ
void unlock(); (since C++14)
Unlocks the associated mutex from shared mode. Effectively calls mutex()->unlock_shared().
std::system_error is thrown if there is no associated mutex or if the mutex is not locked.
π Parameters π
(none) β not a single parameter, bestie. Lowkey zero. None. π«Ά
β¨ Return value β¨
(none) β it returns nothing, it just does the unlock thing. Periodt.
π₯ Exceptions π₯
- Any exceptions thrown by
mutex()->unlock_shared(). - If there is no associated mutex,
std::system_errorwith an error code ofstd::errc::operation_not_permitted.
bestie please note: no associated mutex or a mutex that isnβt locked means std::system_error, okay? No cap, thatβs the exception vibe. π
π§ Example π§
This section is incomplete.
Reason: no example.
Not me wanting an example too, but thatβs what the page says. π
π₯ See also π₯
lockβ locks the associated mutex (public member function)releaseβ disassociates the mutex without unlocking (public member function)
π¦ Category π¦
- Todo no example
xoxo, your Unix bestie π β source: http://cppreference.com, version/date: 2024.06.10, page: std::shared_lock::unlock(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