7#include "../icomparable.hpp"
8#include "../iequatable.hpp"
9#include "../int32_object.hpp"
40 class named_semaphore;
41 class unnamed_semaphore;
70 explicit semaphore(
const string& name,
bool& created_new);
143 template <
typename char_t>
158 void close() override;
162 using
object::equals;
163 bool equals(const
semaphore& value) const noexcept override;
202 static
bool try_open_existing(const
string& name,
semaphore& result) noexcept;
211 bool wait(
int32 milliseconds_timeout) override;
215 void create(
int32 initial_count,
int32 maximum_count,
bool& created_new);
216 xtd::
sptr<semaphore_base> semaphore_;
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.hpp:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Limits the number of threads that can access a resource or pool of resources concurrently.
Definition semaphore.hpp:38
semaphore(const string &name, bool &created_new)
nitializes a new instance of the xtd::threading::semaphore class, specifying optionally specifying th...
semaphore(int32 initial_count, const string &name, bool &created_new)
nitializes a new instance of the xtd::threading::semaphore class, specifying the initial number of en...
semaphore(int32 initial_count, int32 maximum_count, const string &name, bool &created_new)
nitializes a new instance of the xtd::threading::semaphore class, specifying the initial number of en...
semaphore(int32 initial_count, int32 maximum_count, const string &name)
Initializes a new instance of the xtd::threading::semaphore class, specifying the initial number of e...
semaphore(int32 initial_count, int32 maximum_count)
Initializes a new instance of the xtd::threading::semaphore class, specifying the initial number of e...
semaphore(const string &name)
nitializes a new instance of the xtd::threading::semaphore class, specifying optionally specifying th...
semaphore()
Initializes a new instance of the xtd::threading::semaphore class.
semaphore(int32 initial_count, const string &name)
nitializes a new instance of the xtd::threading::semaphore class, specifying the initial number of en...
intptr handle() const noexcept override
Gets the native operating system handle.
semaphore(int32 initial_count)
Initializes a new instance of the xtd::threading::semaphore class, specifying the initial number of e...
Encapsulates operating system specific objects that wait for exclusive access to shared resources.
Definition wait_handle.hpp:52
#define core_export_
Define shared library export.
Definition core_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
signal
Specifies signals that can interrupt the current process.
Definition signal.hpp:18
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::threading::semaphore_full_exception exception.
Contains xtd::threading::wait_handle exception.