This commit is contained in:
aozhiwei 2023-05-27 17:14:48 +08:00
parent 6b0773c2e9
commit c4042dbd5b
3 changed files with 7 additions and 7 deletions

View File

@ -12,6 +12,7 @@
#include <initializer_list>
#include <a8/args.h>
#include <a8/result.h>
#include <a8/types.h>
#include <a8/list.h>
#include <a8/xvalue.h>

View File

@ -11,13 +11,6 @@ namespace a8
DoAwait();
}
#if 0
std::shared_ptr<Awaiter> Awaiter::Sleep(int time)
{
return std::make_shared<TimerPromise>(time);
}
#endif
void Awaiter::DoDone()
{
done_ = true;
@ -28,4 +21,9 @@ namespace a8
}
}
void Awaiter::SetResult(std::vector<std::any> results)
{
results_ = std::make_shared<a8::Results>(results);
}
}

View File

@ -26,6 +26,7 @@ namespace a8
void Await(std::shared_ptr<Awaiter> notifyer);
virtual void DoAwait() = 0;
void DoDone();
void SetResult(std::vector<std::any> results);
private:
std::shared_ptr<a8::Results> results_;