Do fibers have priorities?

Fibers are defined as light threads, and threads have priorities because they are pre-planned. However, since the fibers are joint, do they also have priorities?

+3
source share
1 answer

No, they essentially have no priorities, as in collaborative multitasking, the purpose of context switching is always determined by the part of the code that transfers control (for example, calling Fiber.yield (), or it can be called in your implementation).

This does not stop you from implementing a scheduler to determine the next switch at the application level, although it can then decide based on priority again.

+2
source

Source: https://habr.com/ru/post/1793302/


All Articles