We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void done() { printf("done.\n"); }
int calc() { return 1024; }
void callback(int val) { printf("calc result: %d\n", val); }
void main() { co::AsyncCoroutinePool * pPool = co::AsyncCoroutinePool::Create(1024);
pPool->InitCoroutinePool(1024); pPool->Start(4, 128); auto cbp = new co::AsyncCoroutinePool::CallbackPoint; pPool->AddCallbackPoint(cbp); pPool->Post(&foo, &done); pPool->Post<int>(&calc, &callback); for (;;) { size_t trigger = cbp->Run(); if (trigger > 0) break; }
}
就在这个循环里面,感觉好像是死循环了,一直出不来,后面就崩溃了. 是不是没有消息,post之后,在Run里面Pop出来都是空的
The text was updated successfully, but these errors were encountered:
No branches or pull requests
void done()
{
printf("done.\n");
}
int calc() {
return 1024;
}
void callback(int val) {
printf("calc result: %d\n", val);
}
void main()
{
co::AsyncCoroutinePool * pPool = co::AsyncCoroutinePool::Create(1024);
}
就在这个循环里面,感觉好像是死循环了,一直出不来,后面就崩溃了.
是不是没有消息,post之后,在Run里面Pop出来都是空的
The text was updated successfully, but these errors were encountered: