Y
Hacker News
new
|
ask
|
show
|
jobs
by
cafxx
3151 days 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.
1 comments
amelius
3151 days ago
And this solution does somehow not switch between goroutines?
link
willvarfar
3151 days ago
No, the event loop is just one big goroutine that calls all the handlers directly.
link
allengeorge
3151 days ago
Which...is the same as “not switch between goroutines” no?
link
weberc2
3151 days ago
Correct. I'm fairly certain he was agreeing with you.
link
willvarfar
3151 days ago
(I think there was an edit)
link