This commit is contained in:
aozhiwei 2023-05-27 14:31:17 +08:00
parent bdb5e79713
commit 79d7cce34b
2 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,7 @@ void TimerPromise::DoAwait()
f8::Timer::Instance()->SetTimeout
(
time_,
[this, self = shared_from_this()] (int event, const a8::Args* args) mutable
[this, _self = shared_from_this()] (int event, const a8::Args* args) mutable
{
if (event == a8::TIMER_EXEC_EVENT) {
done_ = true;

View File

@ -21,6 +21,7 @@ namespace a8
class Awaiter : public std::enable_shared_from_this<Awaiter>
{
public:
virtual ~Awaiter() {};
std::shared_ptr<a8::Results> GetResult()
{