4 ms·
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. Switchin
by cafxx 9y ago
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.
- amelius 9y agoAnd this solution does somehow not switch between goroutines?
- willvarfar 9y agoNo, the event loop is just one big goroutine that calls all the handlers directly.
- allengeorge 9y agoWhich...is the same as “not switch between goroutines” no?
- willvarfar 9y ago(I think there was an edit)
- weberc2 9y agoCorrect. I'm fairly certain he was agreeing with you.