1
This commit is contained in:
parent
6b0773c2e9
commit
c4042dbd5b
1
a8/a8.h
1
a8/a8.h
@ -12,6 +12,7 @@
|
|||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
|
||||||
#include <a8/args.h>
|
#include <a8/args.h>
|
||||||
|
#include <a8/result.h>
|
||||||
#include <a8/types.h>
|
#include <a8/types.h>
|
||||||
#include <a8/list.h>
|
#include <a8/list.h>
|
||||||
#include <a8/xvalue.h>
|
#include <a8/xvalue.h>
|
||||||
|
@ -11,13 +11,6 @@ namespace a8
|
|||||||
DoAwait();
|
DoAwait();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
std::shared_ptr<Awaiter> Awaiter::Sleep(int time)
|
|
||||||
{
|
|
||||||
return std::make_shared<TimerPromise>(time);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void Awaiter::DoDone()
|
void Awaiter::DoDone()
|
||||||
{
|
{
|
||||||
done_ = true;
|
done_ = true;
|
||||||
@ -28,4 +21,9 @@ namespace a8
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Awaiter::SetResult(std::vector<std::any> results)
|
||||||
|
{
|
||||||
|
results_ = std::make_shared<a8::Results>(results);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ namespace a8
|
|||||||
void Await(std::shared_ptr<Awaiter> notifyer);
|
void Await(std::shared_ptr<Awaiter> notifyer);
|
||||||
virtual void DoAwait() = 0;
|
virtual void DoAwait() = 0;
|
||||||
void DoDone();
|
void DoDone();
|
||||||
|
void SetResult(std::vector<std::any> results);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<a8::Results> results_;
|
std::shared_ptr<a8::Results> results_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user