From 4384bc7ac05ef6bad5e1dfe94b7d4211b81930c0 Mon Sep 17 00:00:00 2001 From: azw Date: Fri, 18 Aug 2023 15:41:03 +0000 Subject: [PATCH] 1 --- f8/coroutine.cc | 5 +++++ f8/coroutine.h | 1 + 2 files changed, 6 insertions(+) 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: