2 ms·
Go-the-language does not have a preemptive scheduler, just guarantees about how various means of synchronization interact. In fact, Go-the-implementation is on
by skj 11y ago
Go-the-language does not have a preemptive scheduler, just guarantees about how various means of synchronization interact.
In fact, Go-the-implementation is only partially preemptive, I believe: in addition to calls into the runtime, calling any function can now be a scheduling event. But if you have a tight loop with no function calls (just arithmetic, perhaps), that goroutine will not yield control. A true preemptive scheduler would be able to take control from that goroutine.
- eternalban 11y agoNot so. http://golang.org/doc/go1.2#preemption http://golang.org/doc/go1.2#preemption [edit: hmm. Possibly I've mis-parsed that.]
- skj 11y agoI'm pretty sure you parsed that wrong :)
- eternalban 11y agoYes, you're right. But original . re CSP stands :)
- skj 11y agoSure. I don't really know much about CSP.