xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
threading
cancellation_token_source.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
cancellation_token.hpp
"
6
#include "
../core_export.hpp
"
7
#include "
../object.hpp
"
8
#include "
../types.hpp
"
9
11
namespace
xtd
{
13
namespace
threading
{
38
class
core_export_
cancellation_token_source :
public
object
{
39
struct
data
;
40
public
:
42
44
cancellation_token_source(
int32
milliseconds_delay);
45
cancellation_token_source(
const
time_span
& delay);
47
49
cancellation_token_source();
51
53
55
[[nodiscard]]
auto
is_cancellation_requested()
const
noexcept
-> bool;
56
57
[[nodiscard]]
auto
token()
noexcept
-> cancellation_token&;
58
[[nodiscard]]
auto
token()
const
noexcept
->
const
cancellation_token&;
60
62
64
auto
cancel() -> void;
66
67
private
:
68
[[nodiscard]]
auto
can_be_canceled()
const
noexcept
-> bool;
69
[[nodiscard]]
auto
wait_handle()
noexcept
->
threading::wait_handle
&;
70
71
friend
class
cancellation_token;
72
xtd::sptr<data>
data_;
73
};
74
}
75
}
cancellation_token.hpp
Contains xtd::threading::cancellation_token class.
xtd::object::object
object()=default
Create a new instance of the ultimate base class object.
xtd::threading::wait_handle
Encapsulates operating system specific objects that wait for exclusive access to shared resources.
Definition
wait_handle.hpp:52
xtd::time_span
Represents a time interval.
Definition
time_span.hpp:29
core_export.hpp
Contains core_export_ keyword.
core_export_
#define core_export_
Define shared library export.
Definition
core_export.hpp:13
xtd::sptr
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition
sptr.hpp:25
xtd::int32
std::int32_t int32
Represents a 32-bit signed integer.
Definition
int32.hpp:25
xtd::threading
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition
abandoned_mutex_exception.hpp:10
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
xtd::data
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition
read_only_span.hpp:197
object.hpp
Contains xtd::object class.
types.hpp
Contains xtd fundamental types.
Generated on
for xtd by
Gammasoft
. All rights reserved.