std::shared...shared_lock(3)
π¦ std::shared_lock::~shared_lock π¦
okay so this is the std::shared...shared_lock(3) page from the C++ Standard Libary manual, and we are literally here for the destructor of std::shared_lock. bestie, itβs giving cleanup era, and no cap itβs important. π
πΈ NAME πΈ
std::shared_lock::~shared_lock β yep, the whole name is std::shared_lock::~shared_lock. iconic, honestly. π
β¨ Synopsis β¨
The signature is right here, and itβs marked since C++14:
~shared_lock(); (since C++14)
What it does: it destroys the lock. thatβs the whole mood. π
Hereβs the careful part, because details are main character energy: if *this has an associated mutex β meaning mutex() returns a non-null pointer β and it has acquired ownership of that mutex β meaning owns() returns true β then the mutex is unlocked by calling unlock_shared(). π₯
bestie, the unlock happens when those conditions line up, fr fr. π«Ά
cute little sign-off: this page came from http://cppreference.com, dated 2024.06.10, and itβs the std::shared...shared_lock(3) page. slay, bye πβ¨
π¦ 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