std::shared...utex::unlock(3)

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

omg hi bestie πŸ’– you’ve opened the std::shared...utex::unlock(3) page from the C++ Standard Libary manual (yes, that spelling is in the manual name, no cap πŸ™ˆ).

πŸŽ€ NAME πŸŽ€

std::shared_timed_mutex::unlock β€” literally std::shared_timed_mutex::unlock, that’s the name, that’s the whole vibe πŸ’….

🌸 Synopsis 🌸

void unlock();  (since C++14)

okay so this one unlocks the mutex. unlocked and unbothered, periodt ✨.

the mutex must be locked by the current thread of execution, otherwise the behavior is undefined. not β€œmaybe fine”, not β€œwe’ll see”, undefined β€” so like, respect the vibe check 🚨.

this operation synchronizes-with (as defined in std::memory_order) any subsequent lock operation that obtains ownership of the same mutex. that’s the whole synchronization plotline πŸ’«.

🫢 Parameters 🫢

none, bestie β€” (none) πŸ“.

πŸŽ€ Return value πŸŽ€

also none β€” (none) πŸ’–.

πŸ¦‹ Exceptions πŸ¦‹

throws nothing. not a single throw, iconic 😌.

πŸ’… Notes πŸ’…

unlock() is usually not called directly: std::unique_lock and std::lock_guard are used to manage exclusive locking. so like, the wrappers are the main characters here, and unlock() is lowkey the supporting cast 🫢.

πŸ’€ Example πŸ’€

This section is incomplete. Reason: no example.

not me showing up with no example 😭 β€” that’s literally what the page says.

πŸ”₯ 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.

πŸ’€ Category πŸ’€

  • Todo no example

and that’s the page, bestie 🫢 β€” source/version http://cppreference.com, dated 2024.06.10, page std::shared...utex::unlock(3). mwah πŸ’‹

πŸ“¦ where this page comes from