O'Reilly logo

Go Standard Library Cookbook by Radomir Sohlich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction

The programming of concurrent behavior is always hard. Go has pretty good mechanisms for managing the concurrency in the form of channels. Besides the channels as a synchronization mechanism, the Go standard library provides the package to handle the concurrent parts of the more traditional core way. This chapter describes how to leverage the sync package for implementing common synchronization tasks. The final recipe will show the simplification of error propagation for a group of goroutines.

Check if Go is properly installed. The Getting ready section in the Retrieving Golang version recipe of Chapter 1, Interacting with the Environment, will help you. Make sure the ports 8080 and 7070 are not used by another application. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required