userver
C++ Async Framework
Loading...
Searching...
No Matches
task_processor_fwd.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
#
include
<
cstddef
>
4
#
include
<
functional
>
5
6
/// @file userver/engine/task/task_processor_fwd.hpp
7
/// @brief Manages tasks execution on OS threads.
8
9
USERVER_NAMESPACE_BEGIN
10
11
/// Asynchronous engine primitives
12
namespace
engine {
13
14
/// @brief Manages tasks execution on OS threads.
15
///
16
/// To create a task processor add its configuration to the "task_processors"
17
/// section of the components::ManagerControllerComponent static configuration.
18
class
TaskProcessor;
19
20
/// @brief Get approximate count of ready-to-run tasks on the `task_processor`
21
std::size_t
GetQueueSize
(
const
TaskProcessor& task_processor)
noexcept
;
22
23
/// @brief Get the number of worker threads in `task_processor`.
24
std::size_t
GetWorkerCount
(
const
TaskProcessor& task_processor)
noexcept
;
25
26
/// @brief Register a function that runs on all threads on task processor
27
/// creation. Used for pre-initializing thread_local variables with heavy
28
/// constructors (constructor that does blocking system calls, file access,
29
/// ...):
30
///
31
/// @note It is a low-level function. You might not want to use it.
32
void
RegisterThreadStartedHook
(std::function<
void
()>);
33
34
}
// namespace engine
35
36
USERVER_NAMESPACE_END
userver
engine
task
task_processor_fwd.hpp
Generated on Thu Apr 16 2026 13:30:00 for userver by
Doxygen
1.13.2