std::timed_mutex::unlock(3)
π
std::timed_mutex::unlock π
okay so this page is from the C++ Standard Libary manual, section 3, and it's literally the std::timed_mutex::unlock page β bestie, we're unlocking mutexes and keeping the vibes immaculate π
β¨ NAME β¨
std::timed_mutex::unlock β yes, that's the name, it's giving "the unlock function for std::timed_mutex" and we're obsessed π
π Synopsis
void unlock(); (since C++11)
Unlocks the mutex. simple as that, no cap β¨
The mutex must be locked by the current thread of execution, otherwise, the behavior is undefined. like, do not freestyle this one, bestie π that's the undefined-behavior zone π
This operation synchronizes-with (as defined in std::memory_order) any subsequent lock operation that obtains ownership of the same mutex. yes queen, memory-ordering lore π§
π§Ύ Parameters
(none) β zero parameters, not a single one, we love a low-maintenance icon π
π Return value
(none) β it returns nothing, because the unlock is the moment, periodt π
π¨ Exceptions
Throws nothing. literally nothing. not even a little throw. slay π«Ά
π Notes
unlock() is usually not called directly: std::unique_lock and std::lock_guard are used to manage exclusive locking. so like, yes you can call it, but the cool kids let the manager besties handle it π
π§ͺ Example
This section is incomplete Reason: no example
not me finding an incomplete Example section π bestie we have no example, it's giving "todo" but make it iconic π
π See also
lockβ locks the mutex, blocks if the mutex is not available (public member function)try_lockβ tries to lock the mutex, returns if the mutex is not available (public member function)try_lock_forβ tries to lock the mutex, returns if the mutex has been unavailable for the specified timeout duration (public member function)try_lock_untilβ tries to lock the mutex, returns if the mutex has been unavailable until specified time point has been reached (public member function)- C documentation for
mtx_unlockβ the C side of the story, iykyk
ποΈ Category
Todo no example
big kiss to http://cppreference.com β source/version and date 2024.06.10, plus the std::timed_mutex::unlock(3) footer energy β byeeeeee ππ¦
π¦ 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