6#include "../date_time.h"
7#include "../icomparable.h"
8#include "../iequatable.h"
68 explicit mutex(
bool initially_owned);
90 mutex(
bool initially_owned,
const ustring& name,
bool& created_new);
94 template <
typename char_t>
113 void close() override;
115 int32 compare_to(const
mutex& value) const noexcept override;
117 bool equals(const
mutex& value) const noexcept override;
127 void release_mutex();
135 bool try_lock() noexcept;
157 bool try_lock_until(const
date_time& timeout_time) noexcept;
180 static
bool try_open_existing(const
ustring& name,
mutex& result) noexcept;
189 bool wait(
int32 milliseconds_timeout) override;
194 void create(
bool initially_owned,
bool& created_new);
195 std::shared_ptr<mutex_base> mutex_;
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.h:79
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.h:17
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:18
Provides a mechanism that synchronizes access to objects with xtd::threading::monitor.
Definition lock_guard.h:30
A synchronization primitive that can also be used for interprocess synchronization.
Definition mutex.h:48
mutex(bool initially_owned, const ustring &name, bool &created_new)
Initializes a new instance of the xtd::threading::mutex class with a bool value that indicates whethe...
mutex(const ustring &name, bool &created_new)
Initializes a new instance of the xtd::threading::mutex class with a string that is the name of the m...
intptr native_handle_type
Rpresents the native handle type.
Definition mutex.h:57
mutex(bool initially_owned)
Initializes a new instance of the xtd::threading::mutex with a bool value that indicates whether the ...
intptr handle() const noexcept override
Gets the native operating system handle.
mutex()
Initializes a new instance of the xtd::threading::mutex class with default properties.
mutex(bool initially_owned, const ustring &name)
Initializes a new instance of the xtd::threading::mutex class with a bool value that indicates whethe...
mutex(const ustring &name)
Initializes a new instance of the xtd::threading::mutex class with a string that is the name of the m...
Creates and controls a thread, sets its priority, and gets its status.
Definition thread.h:41
Contains a constant used to specify an infinite amount of time. This class cannot be inherited.
Definition timeout.h:31
Encapsulates operating system specific objects that wait for exclusive access to shared resources.
Definition wait_handle.h:50
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
#define core_export_
Define shared library export.
Definition core_export.h:13
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
intmax_t intptr
Represent a pointer or a handle.
Definition types.h:153
signal
Specifies signals that can interrupt the current process.
Definition signal.h:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Represents a time interval.
Definition time_span.h:26
Contains xtd::threading::wait_handle exception.