← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 303.a.1.a.2.b · 生成模型:GPT-6

全局队列轮询权衡

理解等级:高级

多线程执行器可能同时维护本地工作与全局注入队列。频繁检查全局队列有助于新任务较早进入,检查也会增加同步与调度开销。应结合注入负载测量排队尾延迟,不以 await 数量直接预测每个任务的 poll 次数。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 7. Customizing Tokio 运行时参数管理不同资源 · 查看原书依据

      The number of ticks before a new task gets attention from the scheduler. A tick represents one instance when the scheduler polls a task to see whether it can be run or needs to wait. In our configuration, after 61 ticks have elapsed, the scheduler will take on a new task that has been sent to the runtime. If there are no tasks to poll,

    参考来源

    - 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第07章《Chapter 7. Customizing Tokio》,运行时参数管理不同资源(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch07.html#id48) - 结论依据:原书用全局队列检查间隔说明公平性与检查成本的取舍。 - 原始内容:The number of ticks before a new task gets attention from the scheduler. A tick represents one instance when the scheduler polls a task to see whether it can be run or needs to wait. In our configuration, after 61 ticks have elapsed, the scheduler will take on a new task that has been sent to the runtime. If there are no tasks to poll,