开发者

twisted reactor: priority and insights

开发者 https://www.devze.com 2023-02-14 08:53 出处:网络
Two simple questions about twisted reactor: Is there a way to explicitly assign a priority while scheduling a task ?

Two simple questions about twisted reactor:

  1. Is there a way to explicitly assign a priority while scheduling a task ?

  2. Is it possible 开发者_如何学Cto inspect the reactor in order to list all the pending tasks?


No. The reactor does not implement priority-based scheduling; it just runs events in whatever order they happen to come back from your multiplexing/timing mechanism, depending on the particular reactor implementation (it's slightly different for the different ones).

Implementing a scheduling or fair queueing API in the reactor would be an awesome addition, but it would be a non-trivial amount of work.

0

精彩评论

暂无评论...
验证码 换一张
取 消