Replies: 1 comment 2 replies
-
AceRoutine is a cooperative multitasking library, so there is no ability to prioritize one coroutine over another. I am not even sure what "higher priority" would even mean in the context of this library. Do you have a concrete example where this might be important? If you call your coroutines manually using With regards to |
Beta Was this translation helpful? Give feedback.
-
How do I prioritise Coroutines? I expect that there is no preemptive scheduling, only yield of control with COROUTINE_DELAY (or similar).
BTW will COROUTINE_DELAY(0) actually yield control, or continue straight away?
Let's say I have COROUTINE(urgent), COROUTINE(normal), and COROUTINE(background).
How do I ensure that
urgent
gets dispatched before the others, should multiple routines be ready to run?Is dispatch order decided by declaration order?
Or by order of
foo.runCoroutine()
inloop()
(which I suspect) ?Would the most appropriate way to prioritise them be:
?
Thanks for this useful library, and any assistance you can give.
Beta Was this translation helpful? Give feedback.
All reactions