Skip to content

Comment on Evio – Fast event-loop networking for Goparent

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)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.