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
您好,我想请教一下,如何正确创建多个Client?
我看您的给出的示例中,有一个clients_cross_thread例子中包含创建多个Client的场景,例子中的做法是在调用loop->run()之前,完成所有Client的构造,我的疑惑就是如果想动态创建Client,或者说在loop->run()启动以后,要怎么正确创建多个Client呢?
clients_cross_thread
The text was updated successfully, but these errors were encountered:
在你client的loop下任意回调函数里创建,比如定时器,结束消息回调。如果没有回调,可以 loop->runInThisLoop({ client = new client }) 否则,因为libuv本身不是线程安全,会core dump。
Sorry, something went wrong.
No branches or pull requests
您好,我想请教一下,如何正确创建多个Client?
我看您的给出的示例中,有一个
clients_cross_thread
例子中包含创建多个Client的场景,例子中的做法是在调用loop->run()之前,完成所有Client的构造,我的疑惑就是如果想动态创建Client,或者说在loop->run()启动以后,要怎么正确创建多个Client呢?The text was updated successfully, but these errors were encountered: