Files
cppdraft_translate/cppdraft/mutex/syn.md
2025-10-25 03:02:53 +03:00

1.7 KiB

[mutex.syn]

32 Concurrency support library [thread]

32.6 Mutual exclusion [thread.mutex]

32.6.2 Header synopsis [mutex.syn]

🔗

namespace std {// [thread.mutex.class], class mutexclass mutex; // [thread.mutex.recursive], class recursive_mutexclass recursive_mutex; // [thread.timedmutex.class], class timed_mutexclass timed_mutex; // [thread.timedmutex.recursive], class recursive_timed_mutexclass recursive_timed_mutex; struct defer_lock_t { explicit defer_lock_t() = default; }; struct try_to_lock_t { explicit try_to_lock_t() = default; }; struct adopt_lock_t { explicit adopt_lock_t() = default; }; inline constexpr defer_lock_t defer_lock { }; inline constexpr try_to_lock_t try_to_lock { }; inline constexpr adopt_lock_t adopt_lock { }; // [thread.lock], lockstemplate class lock_guard; template<class... MutexTypes> class scoped_lock; template class unique_lock; templatevoid swap(unique_lock& x, unique_lock& y) noexcept; // [thread.lock.algorithm], generic locking algorithmstemplate<class L1, class L2, class... L3> int try_lock(L1&, L2&, L3&...); template<class L1, class L2, class... L3> void lock(L1&, L2&, L3&...); struct once_flag; template<class Callable, class... Args>void call_once(once_flag& flag, Callable&& func, Args&&... args);}