92 bool equals(const
object& obj) const noexcept override;
113 friend class cancellation_token_source;
116 bool canceled_ = false;
117 cancellation_token_source* token_source_ =
nullptr;
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
object()=default
Create a new instance of the ultimate base class object.
Signals to a xtd::threading::cancellation_token that it should be canceled.
Definition cancellation_token_source.hpp:38
bool can_be_canceled() const noexcept
Gets whether this token is capable of being in the canceled state.
void throw_if_cancellation_requested() const
Throws a xtd::operation_canceled_exception if this token has had cancellation requested.
cancellation_token(bool canceled)
Initializes the xtd::threading::cancellation_token.
threading::wait_handle & wait_handle() noexcept
Gets a xtd::threading::wait_handle that is signaled when the token is canceled.
static cancellation_token none
Represents an empty xtd::threading::cancellation_token value.
Definition cancellation_token.hpp:48
bool equals(const object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
bool is_cancellation_requested() const noexcept
Gets whether cancellation has been requested for this token.
Contains core_export_ keyword.
#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
@ other
The operating system is other.
Definition platform_id.hpp:58
Contains xtd::iequatable interface.
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 fundamental types.
Contains xtd::threading::wait_handle class.