Racket 中的公平线程调度程序时间基准
Racket(以前的PLT方案)中是如何计算为线程分配的时间片的?例如“每个线程有 16 毫秒运行,然后切换到下一个”。是否有要设置的变量或可以更改值的命令行参数?我在文档中没有找到有关此内容的任何信息。现在深入研究来源......
How is the time slice allocated for a thread calculated in Racket (formerly PLT Scheme)? E.g. "each thread has 16 ms to run, then switch to the next". Is there a variable to set, or a command line parameter to change the value? I didn't find any information about this in the docs. Diving into the sources now...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不会在文档中查找太多内容,因此源代码是您最好的选择。一般来说,寻找为每个线程分配的“燃料”(IIRC)的提及,如果当前线程因 IO 或类似情况而阻塞,则线程可以更改。
You won't have much in the documentation to look for, so the sources are your best bet. In general, look for mentions of "fuel" which (IIRC) is allocated for each thread, and a thread can change if the current one is blocking for IO or something similar.