O'Reilly logo

Distributed Computing with Go by V.N. Nikhil Anurag

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

Summary

In this chapter, we looked at the reason to control parallelism and developed an appreciation for the complexity of the task when a shared state is involved. We used the example of an overworked cashier as a programming problem to solve and to experiment with channels, and further explored different types of channels and the nuances involved with using them. For example, we saw that both closed buffered and unbuffered channels will cause panic if we try to send messages on them, and receiving messages from them leads to different results based on whether the channel is buffered and if the channel is empty or full. We also saw how to wait on multiple channels without blocking on any with the help of select.

In later chapters, from  ...

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