Go Concurrency: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
=Goroutines= | =Goroutines= | ||
<font color=darkkhaki> | |||
OS threads. | 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]] | |||
</font> | |||
=Channels= | =Channels= |
Revision as of 22:17, 2 January 2024
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.