There are actually two different ways of achieving concurrency in Go:
Nice format:
import (
"fmt"
)
Buffer size
Go routines:
-
Coroutines
-
Proto-threads
-
Light threads
-
event loops (something about the Plan 9 tool chain)
-
OS threads
Minimalist design, no...
- operator overloading
- function overloading
- replacement of methods
- altering imported types
- default params
Nice things about it:
- good reflection api
- zero initialized memory
- local variables aren't
- multiple function return values
- no reference implementation
Error handling - apparently pretty controversial
Two implementations "An amended version of C"
Concureency primitives, the most exciting part.
Notable primitives:
- Goroutines
- Channels
- Select - especially hard to implement
http://www.nada.kth.se/~snilsson/
When end of function is reached, all currently executing threads are killed. Unlike others. Explicitness.
go maxprocs
Usually one doesn't use buffering.
Goroutines provide both synchronization and communication.
IIFE: go function() { // do stuff }()
Specifying the type in variable declaration
var ch <- chan Sushi = Producer()