xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
threading
tasks
itask.hpp
Go to the documentation of this file.
1
4
#include "
../cancellation_token.hpp
"
5
#include "
../../int32.hpp
"
6
#include "
../../interface.hpp
"
7
#include "
../../time_span.hpp
"
8
10
namespace
xtd
{
12
namespace
threading
{
14
namespace
tasks
{
19
class
itask
interface_
{
20
public
:
22
26
[[nodiscard]]
virtual
auto
id
() const noexcept ->
xtd
::
usize
= 0;
28
30
33
virtual auto
start
() ->
void
= 0;
34
36
virtual auto
wait
() ->
void
= 0;
40
virtual auto
wait
(
xtd
::
int32
milliseconds_timeout) ->
bool
= 0;
44
virtual auto
wait
(
xtd
::
int32
milliseconds_timeout,
xtd
::
threading
::
cancellation_token
&
cancellation_token
) ->
bool
= 0;
48
virtual auto
wait
(const
xtd
::
time_span
&
timeout
) ->
bool
= 0;
52
virtual auto
wait
(const
xtd
::
time_span
&
timeout
,
xtd
::
threading
::
cancellation_token
&
cancellation_token
) ->
bool
= 0;
54
};
55
}
56
}
57
}
cancellation_token.hpp
Contains xtd::threading::cancellation_token class.
xtd::threading::cancellation_token
Propagates notification that operations should be canceled.
Definition
cancellation_token.hpp:39
xtd::threading::tasks::itask
Represents an interface for an asynchronous operation.
Definition
itask.hpp:19
xtd::threading::tasks::itask::start
virtual auto start() -> void=0
Starts the task, scheduling it for execution to the current xtd::threading::tasks::task_scheduler.
xtd::threading::tasks::itask::wait
virtual auto wait() -> void=0
Waits for the task to complete execution.
xtd::threading::tasks::itask::id
virtual auto id() const noexcept -> xtd::usize=0
Gets an ID for this task instance.
xtd::threading::timeout
Contains a constant used to specify an infinite amount of time. This class cannot be inherited.
Definition
timeout.hpp:33
xtd::time_span
Represents a time interval.
Definition
time_span.hpp:29
interface_
#define interface_
This keyword is use to represent an interface.
Definition
interface.hpp:58
xtd::int32
std::int32_t int32
Represents a 32-bit signed integer.
Definition
int32.hpp:25
xtd::usize
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition
usize.hpp:22
int32.hpp
Contains xtd::int32 type.
interface.hpp
Contains xtd::interface interface.
xtd::threading::tasks
The xtd::threading::tasks namespace provides types that simplify the work of writing concurrent and a...
Definition
basic_task.hpp:32
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
time_span.hpp
Contains xtd::time_span class.
Generated on
for xtd by
Gammasoft
. All rights reserved.