3 ms·
cooperative scheduling is the basis for so many patterns with great metrics :)
by raggi 2y ago
cooperative scheduling is the basis for so many patterns with great metrics :)
- nine_k 2y agoBut it's not very cooperative, as in tasks yielding to each other. They mostly cooperate by letting some tasks to be given to other threads, and not all the time, but once in a heartbeat. The scheduling happens rarely, so its amortized cost is low.
- raggi 2y agosure, but that's all details, and there are other cooperative scheduling models which aren't excessively eager. this isn't to be a downer on this implementation, or other implementations, but just generally pointing at cooperative advantages, of which there are many, with one particular implicit and major downside, which is starvation when the cooperation contract is not adhered to.