In my Python program, I use eventlet to create a lot of greenthreads, just want to know if the current greenthread sleeps, which one of the rest will get scheduled and run? Any scheduler in the eventlet?
Thanks!
In my Python program, I use eventlet to create a lot of greenthreads, just want to know if the current greenthread sleeps, which one of the rest will get scheduled and run? Any scheduler in the eventlet?
Thanks!
一般来说,准备好两个绿色线程,哪个要运行是未定义的。您应该编写程序,就好像每次都是随机选择一样。
实现细节是我们有具有 FIFO 语义的调度程序队列。但是等待时间(>0 秒)或等待文件描述符(包括网络)会变得有点复杂。
哦,我们这里有官方 Github 存储库https://github.com/eventlet/eventlet
请观看此链接并阅读greenthread link2