diff --git a/f8/coroutine.cc b/f8/coroutine.cc index 1c8796d..01679c4 100644 --- a/f8/coroutine.cc +++ b/f8/coroutine.cc @@ -97,6 +97,11 @@ namespace f8 return awaiter->GetResult(); } + std::shared_ptr Coroutine::CoAwait(std::function<(std::shared_ptr)> cb) + { + + } + void Coroutine::Attach() { list_add_tail(&exec_entry_, &CoMgr::Instance()->exec_list_); diff --git a/f8/coroutine.h b/f8/coroutine.h index 97f345b..6ca251f 100644 --- a/f8/coroutine.h +++ b/f8/coroutine.h @@ -19,6 +19,7 @@ namespace f8 void CoResume(); void CoYield(); std::shared_ptr CoAwait(std::shared_ptr awaiter); + std::shared_ptr CoAwait(std::function<(std::shared_ptr)> cb); std::shared_ptr Sleep(long long time); private: