Represents a synchronization primitive that is signaled when its count reaches zero.
Constructors | |
| countdown_event (int32 initial_count) | |
| Initializes a new instance of xtd::threading::countdown_event class with the specified count. More... | |
Properties | |
| int32 | current_count () const |
| Gets the number of remaining signals required to set the event. More... | |
| int32 | initial_count () const |
| Gets the numbers of signals initially required to set the event. More... | |
| bool | is_set () const |
| ndicates whether the xtd::threading::countdown_event object's current count has reached zero. More... | |
| const xtd::threading::wait_handle & | wait_handle () const |
| Gets a xtd::threading::wait_handle that is used to wait for the event to be set. More... | |
| xtd::threading::wait_handle & | wait_handle () |
| Gets a xtd::threading::wait_handle that is used to wait for the event to be set. More... | |
Methods | |
| void | add_count () |
| Increments the xtd::threading::countdown_event's current count by one. More... | |
| void | add_count (int32 count) |
| Increments the xtd::threading::countdown_event's current count by one. More... | |
| void | close () |
| Close the current instance of the xtd::threading::countdown_event class. More... | |
| void | reset () |
| Resets the xtd::threading::countdown_event to the value of xtd::threading::countdown_event::initial_count. More... | |
| void | reset (int32 count) |
| Resets the xtd::threading::countdown_event::initial_count property to a specified value. More... | |
| bool | signal () |
| Registers a signal with the xtd::threading::countdown_event, decrementing the value of xtd::threading::countdown_event::current_count. More... | |
| bool | signal (int32 signal_count) |
| Registers multiple signals with the xtd::threading::countdown_event, decrementing the value of xtd::threading::countdown_event::current_count by the specified amount. More... | |
| bool | try_add_count () noexcept |
| Attempts to increment xtd::threading::countdown_event::current_count by one. More... | |
| bool | try_add_count (int32 count) noexcept |
| Attempts to increment xtd::threading::countdown_event::current_count by by a specified value. More... | |
| void | wait () |
| Blocks the current thread until the xtd::threading::countdown_event is set. More... | |
| bool | wait (int32 milliseconds_timeout) |
| Blocks the current thread until the xtd::threading::countdown_event is set, using a 32-bit signed integer to measure the timeout. More... | |
| void | wait (const cancellation_token &cancellation_token) |
| Blocks the current thread until the xtd::threading::countdown_event is set, while observing a xtd::threading::cancellation_token. More... | |
| bool | wait (const time_span &timeout) |
| Blocks the current thread until the xtd::threading::countdown_event is set, using a xtd::time_span to measure the timeout. More... | |
| bool | wait (int32 milliseconds_timeout, const cancellation_token &cancellation_token) |
| Blocks the current thread until the xtd::threading::countdown_event is set, using a 32-bit signed integer to measure the timeout, while observing a xtd::threading::cancellation_token. More... | |
| bool | wait (const time_span &timeout, const cancellation_token &cancellation_token) |
| Blocks the current thread until the xtd::threading::countdown_event is set, using a xtd::time_span to measure the timeout, while observing a xtd::threading::cancellation_token. More... | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::object | |
| object ()=default | |
| Create a new instance of the ultimate base class object. More... | |
| bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More... | |
| virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More... | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. More... | |
| template<typename object_t > | |
| std::unique_ptr< object_t > | memberwise_clone () const noexcept |
| Creates a shallow copy of the current object. More... | |
| virtual xtd::ustring | to_string () const noexcept |
| Returns a sxd::ustring that represents the current object. More... | |
Static Public Member Functions inherited from xtd::object | |
| static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More... | |
| static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More... | |
|
explicit |
Initializes a new instance of xtd::threading::countdown_event class with the specified count.
| initial_count | he number of signals initially required to set the xtd::threading::countdown_event. |
| xtd::argument_out_of_range_exception | initial_count is less than 0. |
| void xtd::threading::countdown_event::add_count | ( | ) |
Increments the xtd::threading::countdown_event's current count by one.
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::invalid_operation_exception | The current instance is already set. |
| void xtd::threading::countdown_event::add_count | ( | int32 | count | ) |
Increments the xtd::threading::countdown_event's current count by one.
| count | The value by which to increase xtd::threading::countdown_event::current_count. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::invalid_operation_exception | The current instance is already set. |
| xtd::argument_out_of_range_exception | count is less than 0. |
| void xtd::threading::countdown_event::close | ( | ) |
Close the current instance of the xtd::threading::countdown_event class.
| int32 xtd::threading::countdown_event::current_count | ( | ) | const |
Gets the number of remaining signals required to set the event.
| xtd::object_closed_exception | The current instance has already been closed. |
| int32 xtd::threading::countdown_event::initial_count | ( | ) | const |
Gets the numbers of signals initially required to set the event.
| xtd::object_closed_exception | The current instance has already been closed. |
| bool xtd::threading::countdown_event::is_set | ( | ) | const |
ndicates whether the xtd::threading::countdown_event object's current count has reached zero.
| xtd::object_closed_exception | The current instance has already been closed. |
| void xtd::threading::countdown_event::reset | ( | ) |
Resets the xtd::threading::countdown_event to the value of xtd::threading::countdown_event::initial_count.
| xtd::object_closed_exception | The current instance has already been closed. |
| void xtd::threading::countdown_event::reset | ( | int32 | count | ) |
Resets the xtd::threading::countdown_event::initial_count property to a specified value.
| count | he number of signals required to set the xtd::threading::countdown_event. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::argument_out_of_range_exception | count is less than 0. |
| bool xtd::threading::countdown_event::signal | ( | ) |
Registers a signal with the xtd::threading::countdown_event, decrementing the value of xtd::threading::countdown_event::current_count.
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::nvalid_operation_exception | The current instance is already set. |
| bool xtd::threading::countdown_event::signal | ( | int32 | signal_count | ) |
Registers multiple signals with the xtd::threading::countdown_event, decrementing the value of xtd::threading::countdown_event::current_count by the specified amount.
| signal_count | The number of signals to register. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::argument_out_of_range_exception | signal_count is less than 0. |
| xtd::nvalid_operation_exception | The current instance is already set. |
|
noexcept |
Attempts to increment xtd::threading::countdown_event::current_count by one.
|
noexcept |
Attempts to increment xtd::threading::countdown_event::current_count by by a specified value.
| count | The value by which to increase xtd::threading::countdown_event::current_count. |
| void xtd::threading::countdown_event::wait | ( | ) |
Blocks the current thread until the xtd::threading::countdown_event is set.
| xtd::object_closed_exception | The current instance has already been closed. |
| bool xtd::threading::countdown_event::wait | ( | int32 | milliseconds_timeout | ) |
Blocks the current thread until the xtd::threading::countdown_event is set, using a 32-bit signed integer to measure the timeout.
| milliseconds_timeout | The number of milliseconds to wait, or xtd::threading::timeout::ifinite (-1) to wait indefinitely. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::argument_out_of_range_exception | milliseconds_timeout is a negative number other than -1, which represents an infinite time-out.. |
| void xtd::threading::countdown_event::wait | ( | const cancellation_token & | cancellation_token | ) |
Blocks the current thread until the xtd::threading::countdown_event is set, while observing a xtd::threading::cancellation_token.
| cancellation_toker | The xtd::threading::cancellation_token to observe. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::operation_canceled_exception | cancellation_token has been canceled. |
| bool xtd::threading::countdown_event::wait | ( | const time_span & | timeout | ) |
Blocks the current thread until the xtd::threading::countdown_event is set, using a xtd::time_span to measure the timeout.
| timeout | A xtd::time_span that represents the number of milliseconds to wait, or a xtd::time_span that represents -1 milliseconds to wait indefinitely. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::argument_out_of_range_exception | milliseconds_timeout is a negative number other than -1, which represents an infinite time-out.. |
| bool xtd::threading::countdown_event::wait | ( | int32 | milliseconds_timeout, |
| const cancellation_token & | cancellation_token | ||
| ) |
Blocks the current thread until the xtd::threading::countdown_event is set, using a 32-bit signed integer to measure the timeout, while observing a xtd::threading::cancellation_token.
| milliseconds_timeout | The number of milliseconds to wait, or xtd::threading::timeout::ifinite (-1) to wait indefinitely. |
| cancellation_toker | The xtd::threading::cancellation_token to observe. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::operation_canceled_exception | cancellation_token has been canceled. |
| xtd::argument_out_of_range_exception | milliseconds_timeout is a negative number other than -1, which represents an infinite time-out.. |
| bool xtd::threading::countdown_event::wait | ( | const time_span & | timeout, |
| const cancellation_token & | cancellation_token | ||
| ) |
Blocks the current thread until the xtd::threading::countdown_event is set, using a xtd::time_span to measure the timeout, while observing a xtd::threading::cancellation_token.
| timeout | A xtd::time_span that represents the number of milliseconds to wait, or a xtd::time_span that represents -1 milliseconds to wait indefinitely. |
| cancellation_toker | The xtd::threading::cancellation_token to observe. |
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::operation_canceled_exception | cancellation_token has been canceled. |
| xtd::argument_out_of_range_exception | milliseconds_timeout is a negative number other than -1, which represents an infinite time-out.. |
| const xtd::threading::wait_handle& xtd::threading::countdown_event::wait_handle | ( | ) | const |
Gets a xtd::threading::wait_handle that is used to wait for the event to be set.
| xtd::object_closed_exception | The current instance has already been closed. |
| xtd::threading::wait_handle& xtd::threading::countdown_event::wait_handle | ( | ) |
Gets a xtd::threading::wait_handle that is used to wait for the event to be set.
| xtd::object_closed_exception | The current instance has already been closed. |