#include <userver/compiler/thread_local.hpp>
A scope that crashes if coroutine context switches are attempted.
This is useful to prevent accidental waiting operations in places where they would be disastrous, e.g. while holding a thread-local resource.
The check only happens in debug builds.
Definition at line 31 of file thread_local.hpp.
Inheritance diagram for compiler::CoroutineSwitchBanScope:Public Member Functions | |
| CoroutineSwitchBanScope (CoroutineSwitchBanScope &&)=delete | |
| CoroutineSwitchBanScope & | operator= (CoroutineSwitchBanScope &&)=delete |
|
inlinenoexcept |
Definition at line 154 of file thread_local.hpp.
|
inline |
Definition at line 160 of file thread_local.hpp.