userver: userver/engine/task/task_processor_fwd.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
task_processor_fwd.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4
5/// @file userver/engine/task/task_processor_fwd.hpp
6/// @brief @copybrief engine::TaskProcessor
7
8USERVER_NAMESPACE_BEGIN
9
10/// Asynchronous engine primitives
11namespace engine {
12
13/// @brief Manages tasks execution on OS threads.
14///
15/// To create a task processor add its configuration to the "task_processors"
16/// section of the components::ManagerControllerComponent static configuration.
17class TaskProcessor;
18
19/// @brief Register a function that runs on all threads on task processor
20/// creation. Used for pre-initializing thread_local variables with heavy
21/// constructors (constructor that does blocking system calls, file access,
22/// ...):
23///
24/// @note It is a low-level function. You might not want to use it.
25void RegisterThreadStartedHook(std::function<void()>);
26
27} // namespace engine
28
29USERVER_NAMESPACE_END