7#include "../action.hpp"
8#include "../object.hpp"
9#include "../time_span.hpp"
57 template <
typename post_phase_action_t>
166 bool wait_wtih_cancellation_token();
167 bool wait_wtih_cancellation_token(
int32 milliseconds_timeout);
Contains xtd::threading::barrier_post_phase_exception exception.
Contains xtd::threading::cancellation_token class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:42
Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.
Definition barrier.hpp:31
int32 remove_participant()
Notifies the Barrier that there will be one less participant.
barrier(int32 participant_count)
Initializes a new instance of the xtd::threading::barrier class.
action< barrier & > post_phase_action
Represents the xtd::threading::barrier::post_phase_action delegate.
Definition barrier.hpp:38
int32 add_participants(int32 participant_count)
Notifies the xtd::threading::barrier that there will be additional participants.
bool signal_and_wait(const time_span &timeout)
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
bool signal_and_wait(int32 milliseconds_timeout)
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
bool signal_and_wait(const time_span &timeout, const cancellation_token &cancellation_token)
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
bool signal_and_wait(const cancellation_token &cancellation_token)
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
int32 participant_count() const
Gets the total number of participants in the barrier.
int32 add_participant()
Notifies the xtd::threading::barrier that there will be an additional participant.
bool signal_and_wait(int32 milliseconds_timeout, const cancellation_token &cancellation_token)
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
int32 remove_participants(int32 participant_count)
Notifies the Barrier that there will be fewer participants.
void close()
Close the current instance of the xtd::threading::barrier class.
void signal_and_wait()
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
int32 participants_remaining() const
Gets the number of participants in the barrier that haven't yet signaled in the current phase.
int32 current_phase_number() const
Gets the number of the barrier's current phase.
barrier(int32 participant_count, barrier::post_phase_action post_phase_action)
Initializes a new instance of the xtd::threading::barrier class.
Propagates notification that operations should be canceled.
Definition cancellation_token.hpp:39
Contains a constant used to specify an infinite amount of time. This class cannot be inherited.
Definition timeout.hpp:33
#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
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
delegate< void(arguments_t...)> action
Represents a xtd::delegate that has variable parameters and does not return a value.
Definition action.hpp:20
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Represents a time interval.
Definition time_span.hpp:29