Concurrency in language design

In most mainstream programming languages, concurrency and multithreading can add complexity and make code harder to read. The designers of Go decided that concurrency should be built in from the beginning, making it easy to manage many threads of execution while still avoiding the difficulty of shared memory management. Go does not expose traditional threads, but instead introduces the concept of goroutines—these are akin to lightweight threads, but it's possible to have several thousand at the same time. Shared memory is normally the main communication mechanism for concurrent applications, but in Go communication is used to share instead—this built-in feature is called channels. In addition to these language features, Go has a sync package within the standard library that provides tools for further concurrency management.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.144.229