freeCodeCamp/guide/english/go/goroutines/index.md

21 lines
1.0 KiB
Markdown
Raw Normal View History

---
title: Goroutines
---
## Goroutines
This is a stub. [Help our community expand it](https://github.com/freecodecamp/guides/tree/master/src/pages/go/goroutines/index.md).
[This quick style guide will help ensure your pull request gets accepted](https://github.com/freecodecamp/guides/blob/master/README.md).
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
2018-10-14 16:28:11 +00:00
Goroutines are functions or methods that run concurrently with other functions or methods. Goroutines can be thought of as light weight threads. The cost of creating a Goroutine is tiny when compared to a thread.
Prefix the function or method call with the keyword `go` and you will have a new Goroutine running concurrently.
#### More Information:
* [A Tour of Go](https://tour.golang.org/concurrency/1)
* [Go By Example](https://gobyexample.com/goroutines)
* [Golang Book](https://www.golang-book.com/books/intro/10)
* [The Go Programming Language Specification](https://golang.org/ref/spec#Go_statements)