twisted reactor: priority and insights
Two simple questions about twisted reactor:
Is there a way to explicitly assign a priority while scheduling a task ?
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.
精彩评论