32
edits
Changes
Team Go
,→Goroutines
== Goroutines ==
A goroutine is a function capable of running concurrently with other functions. They're similar to threads except they're much cheaper, light weight and are managed automatically. Goroutines are only a few kilobytes in stack size and their size can grow and shrink whereas thread size needs to be predetermined. Goroutines are multiplexed to fewer OS threads, there may be thousands of goroutines on on thread. Goroutines communicate using '''channels'''.
<source lang="go">
package main