3 ms·
But we're talking about forcing preemption, which is basically calling into the runtime, isn't it?
by Yoric 4y ago
But we're talking about forcing preemption, which is basically calling into the runtime, isn't it?
- twic 4y agoThe terminology you're using doesn't really make sense to me, so i don't understand what you're asking, i'm afraid. In cooperative multithreading, a thread only enters the runtime when that is part of its normal program flow. The code it's executing does I/O, or acquires a lock, or something like that. In preemptive multithreading, some mechanism can force any thread into the thread scheduler at any time.
- Yoric 4y agoIf you climb back the chain, you'll see > Nonetheless, there were discussions about some way to force preemption at certain points, not sure whether there is a decision since, but that will be the exception, not the rule. I'm trying to understand the difference between "forcing preemption" and requesting for the runtime to yield, the latter being an operation typical in cooperative multithreading.