Two simple questions about twisted reactor:
-
Is there a way to explicitly assign a priority while scheduling a task ?
-
Is it possible to inspect the reactor in order to list all the pending tasks?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.