4 ms·
Go doesn't expose events to the user - the programming interface is one go routine (green thread) per connection. Internally the go scheduler does lots of clev
by nickcw 11y ago
Go doesn't expose events to the user - the programming interface is one go routine (green thread) per connection.
Internally the go scheduler does lots of clever stuff with events but you as the programmer don't have to worry about it.
go routines are very light weight - you can have 10 or 100 thousand easily so this is a very efficient way of running servers with lots of connections.
It is also very easy to program - it is much easier to reason about one thread per connection than to reason about asynchronous event handling.