Goroutines

A Goroutine is a lightweight thread, managed by the Go runtime, not the OS.

In some cases, not all statements starting with goused for spawning a Goroutine, are finished, as the main process might be already done.

The main function is a go routine itself.

A go routine is created using the gokeyword:

Channels

In order to let Goroutines collaborate with each other, one must be able to send information between routines. While the shared memory could be used, this is really hard to manage.

Next chapter: HTTP in Go