Go Concurrency

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

Goroutines

OS threads.

Logically, a goroutine is a function executing concurrently with many other functions in the program. Internally, the goroutine is a structure managed by the Go runtime that with a very small initial memory footprint (a few kilobytes) and that is managed by the runtime, which grows or shrinks the memory allocated for the stack automatically. The CPU overhead averages about three instructions per function call. It is practically al to create hundreds of thousands of goroutines in the same address space.


DEPLETE and DELETE Go_Language_Goroutines

Channels

CSP.

Memory Access and Thread Synchronization Primitives

Patterns