1
This commit is contained in:
parent
9f0679adc2
commit
1607ee5487
@ -20,7 +20,7 @@ void CoMgr::Init()
|
||||
[i] (Coroutine* co)
|
||||
{
|
||||
a8::XPrintf("call subco A %d %d\n", {i, a8::XGetTickCount()});
|
||||
co->CoAwait(co->Sleep(3000));
|
||||
//co->CoAwait(co->Sleep(3000));
|
||||
}).lock());
|
||||
a8::XPrintf("call A %d %d\n", {i, a8::XGetTickCount()});
|
||||
}
|
||||
|
@ -115,7 +115,12 @@ void Coroutine::CallExit(boost::coroutines2::coroutine<void>::push_type& sink)
|
||||
|
||||
void Coroutine::DoAwait()
|
||||
{
|
||||
|
||||
done_ = true;
|
||||
for (auto notifyer : notifyers_) {
|
||||
if (!notifyer.expired()) {
|
||||
notifyer.lock()->DoResume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Coroutine::DoResume()
|
||||
|
Loading…
x
Reference in New Issue
Block a user