Comment on Evio – Fast event-loop networking for GoparentComments−cafxx8yWell, I guess because the runtime has to do a bunch of work to dispatch the events to the appropriate goroutine that is blocked waiting for that event. Switching and synchronization between goroutines is cheap, not free.−amelius8yAnd this solution does somehow not switch between goroutines?−willvarfar8yNo, the event loop is just one big goroutine that calls all the handlers directly.−allengeorge8yWhich...is the same as “not switch between goroutines” no?−weberc28yCorrect. I'm fairly certain he was agreeing with you.−willvarfar8y(I think there was an edit)
Comments
Well, I guess because the runtime has to do a bunch of work to dispatch the events to the appropriate goroutine that is blocked waiting for that event. Switching and synchronization between goroutines is cheap, not free.
And this solution does somehow not switch between goroutines?
No, the event loop is just one big goroutine that calls all the handlers directly.
Which...is the same as “not switch between goroutines” no?
Correct. I'm fairly certain he was agreeing with you.
(I think there was an edit)