libcoro  1.0
Coroutine support library for C++20

◆ CORO_OPT_BARRIER

#define CORO_OPT_BARRIER

marks function which servers as barrier between suspended coroutine and normal code

Some compilers (clang) have too aggresive optimization which leads to declaring stack variables in coroutine frame, which can lead to crash,when these variables are overwritten after nested resume. This option disables optimization for the barrier function, which prevents compiler to reuse space allocated in coroutine frame

Definition at line 125 of file common.h.