Concurrent Counters

This lesson explains how to make a simple data structure like a counter thread safe while ensuring good performance.

We'll cover the following

One of the simplest data structures is a counter. It is a structure that is commonly used and has a simple interface. We define a simple non-concurrent counter in the code excerpt below.

Get hands-on with 1200+ tech skills courses.