11#include "../utility/utility.hpp"
12#include "../macros.hpp"
16hi_export_module(hikogui.concurrency.unfair_mutex : intf);
18namespace hi {
inline namespace v1 {
37template<
bool UseDeadLockDetector>
48 bool is_locked()
const noexcept;
61 void unlock()
noexcept;
70 std::atomic_unsigned_lock_free semaphore = 0;
71 using semaphore_value_type =
typename decltype(semaphore)::value_type;
73 bool holds_invariant()
const noexcept;
75 void lock_contended(semaphore_value_type
expected)
noexcept;
DOXYGEN BUG.
Definition algorithm.hpp:16
geometry/margins.hpp
Definition lookahead_iterator.hpp:5
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:377
An unfair mutex This is a fast implementation of a mutex which does not fairly arbitrate between mult...
Definition unfair_mutex_intf.hpp:38
bool try_lock() noexcept
When try_lock() is called from a thread that already owns the lock it will return false.
Definition unfair_mutex_impl.hpp:213