1#ifndef LIBFILEZILLA_MUTEX_HEADER
2#define LIBFILEZILLA_MUTEX_HEADER
11#include "glue/windows.hpp"
17#ifdef LFZ_DEBUG_MUTEXES
36 std::vector<std::tuple<std::weak_ptr<mutex_debug>, std::vector<void*>>>
order_;
78#ifdef LFZ_DEBUG_MUTEXES
80 std::shared_ptr<mutex_debug> h_;
103#ifdef LFZ_DEBUG_MUTEXES
104 mutex_debug::record_lock(m_);
111#ifdef LFZ_DEBUG_MUTEXES
112 mutex_debug::record_unlock(m_);
130 locked_ =
op.locked_;
139 locked_ =
op.locked_;
157#ifdef LFZ_DEBUG_MUTEXES
158 mutex_debug::record_lock(m_);
170#ifdef LFZ_DEBUG_MUTEXES
171 mutex_debug::record_unlock(m_);
Waitable condition variable.
Definition mutex.hpp:196
void wait(scoped_lock &l)
Wait indefinitely for condition to become signalled.
bool wait(scoped_lock &l, duration const &timeout)
Wait until timeout for condition to become signalled.
bool signalled(scoped_lock const &) const
Check if condition is already signalled.
Definition mutex.hpp:243
void signal(scoped_lock &l)
Signal condition variable.
The duration class represents a time interval in milliseconds.
Definition time.hpp:291
Lean replacement for std::(recursive_)mutex.
Definition mutex.hpp:52
void unlock()
Beware, manual locking isn't exception safe, use scoped_lock.
bool try_lock()
Beware, manual locking isn't exception safe.
void lock()
Beware, manual locking isn't exception safe, use scoped_lock.
A simple scoped lock.
Definition mutex.hpp:93
void unlock()
Releases the mutex.
Definition mutex.hpp:167
void lock()
Obtains the mutex.
Definition mutex.hpp:149
Sets some global macros and further includes string.hpp.
The namespace used by libfilezilla.
Definition apply.hpp:17
bool dispatch(event_base const &ev, F &&f)
Dispatch for simple_event<> based events to simple functors.
Definition event_handler.hpp:199
Assorted classes dealing with time.