57 template<
class post_phase_action_t>
166 auto wait_wtih_cancellation_token() ->
bool;
167 auto wait_wtih_cancellation_token(
xtd::
int32 milliseconds_timeout) ->
bool;
Contains xtd::action delegate.
Contains xtd::threading::barrier_post_phase_exception exception.
Contains xtd::threading::cancellation_token class.
object()=default
Create a new instance of the ultimate base class object.
Enables multiple tasks to cooperatively work on an algorithm in parallel through multiple phases.
Definition barrier.hpp:31
auto participants_remaining() const -> xtd::size
Gets the number of participants in the barrier that haven't yet signaled in the current phase.
xtd::action< barrier & > post_phase_action
Represents the xtd::threading::barrier::post_phase_action delegate.
Definition barrier.hpp:38
auto signal_and_wait() -> void
Signals that a participant has reached the barrier and waits for all other participants to reach the ...
auto add_participants(xtd::size participant_count) -> xtd::size
Notifies the xtd::threading::barrier that there will be additional participants.
auto add_participant() -> xtd::size
Notifies the xtd::threading::barrier that there will be an additional participant.
auto remove_participant() -> xtd::size
Notifies the Barrier that there will be one less participant.
auto participant_count() const -> xtd::size
Gets the total number of participants in the barrier.
auto remove_participants(xtd::size participant_count) -> xtd::size
Notifies the Barrier that there will be fewer participants.
auto current_phase_number() const -> xtd::size
Gets the number of the barrier's current phase.
barrier(xtd::size participant_count)
Initializes a new instance of the xtd::threading::barrier class.
barrier(xtd::size participant_count, barrier::post_phase_action post_phase_action)
Initializes a new instance of the xtd::threading::barrier class.
auto close() -> void
Close the current 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
Represents a time interval.
Definition time_span.hpp:29
#define core_export_
Define shared library export.
Definition core_export.hpp:13
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
delegate< void(arguments_t...)> action
Represents a xtd::delegate that has variable parameters and does not return a value.
Definition action.hpp:20
@ other
The operating system is other.
Definition platform_id.hpp:60
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::object class.
Contains xtd::time_span class.