7 #include "../icomparable.h" 8 #include "../iequatable.h" 9 #include "../int32_object.h" 38 class named_semaphore;
39 class unnamed_semaphore;
141 template <
typename char_t>
149 intptr handle()
const noexcept
override;
150 void handle(
intptr value)
override;
156 void close()
override;
158 int32 compare_to(
const semaphore& value)
const noexcept
override;
160 bool equals(
const semaphore& value)
const noexcept
override;
170 static semaphore open_existing(
const ustring& name);
195 static bool try_open_existing(
const ustring& name, semaphore& result) noexcept;
204 bool wait(
int32 milliseconds_timeout)
override;
208 void create(
int32 initial_count,
int32 maximum_count,
bool& created_new);
209 std::shared_ptr<semaphore_base> semaphore_;
210 std::shared_ptr<data> data_;
signal
Specifies signals that can interrupt the current process.
Definition: signal.h:18
intmax_t intptr
Represent a pointer or a handle.
Definition: types.h:151
Contains xtd::threading::wait_handle exception.
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition: icomparable.h:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Limits the number of threads that can access a resource or pool of resources concurrently.
Definition: semaphore.h:36
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Contains xtd::threading::semaphore_full_exception exception.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Encapsulates operating system specific objects that wait for exclusive access to shared resources...
Definition: wait_handle.h:48