Thread safe data structures using channels in Go.
6 minute read Published:
Introduction Go has a number of great features that make programming fun again. The inclusion of channels as first class values is among my particular favorites. This combined with go also having support for first class functions really provides a great foundation for being able to do some really neat things very easily.
Building a “thread safe” stack. I’m sure we all remember from a ‘classic data structures’ class how to build a stack.