userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
task.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <userver/compiler/impl/lifetime.hpp>
7
#include <
userver/engine/awaitable.hpp
>
8
#include <
userver/engine/task/task_base.hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
engine
{
13
22
class
[[nodiscard]]
Task
:
public
TaskBase
{
23
public
:
27
Task
();
28
31
~Task
();
32
35
Task
(
Task
&& other)
noexcept
;
36
40
Task
&
operator=
(
Task
&& other)
noexcept
;
41
42
Task
(
const
Task
&) =
delete
;
43
Task
&
operator=
(
const
Task
&) =
delete
;
44
46
AwaitableToken
GetAwaitableToken
() noexcept USERVER_IMPL_LIFETIME_BOUND;
47
48
protected:
50
// For internal use only.
51
explicit
Task
(impl::TaskContextHolder&& context);
53
54
private:
55
friend
void
DetachUnscopedUnsafe
(
Task
&& task);
56
};
57
67
void
DetachUnscopedUnsafe
(
Task
&& task);
68
69
}
// namespace engine
70
71
USERVER_NAMESPACE_END
userver
engine
task
task.hpp
Generated on
for userver by
Doxygen
1.17.0