Open main menu

CDOT Wiki β

Changes

Team Go

275 bytes added, 23:48, 17 December 2017
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
32
edits