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
另一个是,多个 worker 线程会并发地执行 tasks,但只有一个 worker 线程会作为 reactor 来 poll events,新的 events 可能是由 reactor 自己,也可能是由其他 worker 线程来执行对应的 future。
文中这样描述,是否和 tokio-rs/tokio#660 这个pr冲突。
The text was updated successfully, but these errors were encountered:
后来在这个 PR 改了一下,现在之后一个 reactor 了。可以看这里
当我们有多个 worker threads 时,只有一个 worker 会抢到 runtime::driver::Driver 的“锁”(没抢到的并不会挂起而是返回 None 而执行 else)而执行 park_driver,其他 worker 会 park_condvar,后边会看到 park_driver 其实就是 poll events,因此只有一个 worker 线程会成为 reactor
Sorry, something went wrong.
No branches or pull requests
文中这样描述,是否和 tokio-rs/tokio#660 这个pr冲突。
The text was updated successfully, but these errors were encountered: