You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is the problem there is some task without co_return;
auto tsk_lock = [&]()->cppcoro::task<>{
mtx.try_lock();
// co_return; /// without it, it makes things unexpected. it makes my unlock() in next task failed assert != not_locked
};
auto tsk_mtx = [&](int i)->cppcoro::task<>{
co_awaitA(i);
co_await mtx.lock_async();
co_awaitAa(i);
co_await pool.schedule();
co_awaitC(i);
mtx.unlock();
co_awaitD(i);
co_return;
};
auto tsk_unlock = [&]()->cppcoro::task<>{
mtx.unlock();
// co_return;
};
cppcoro::when_all(tsk_lock(), tsk_mtx(1), tsk_mtx(2), tsk_mtx(3), tsk_unlock());
The text was updated successfully, but these errors were encountered: