...

/

Semaphore Pattern

Semaphore Pattern

This lesson explains an effective synchronization method that lets goroutines finish their execution first, also known as the semaphore pattern.

Introduction

We can also use a channel for synchronization purposes, effectively using it as what is called a semaphore in traditional computing. To put it differently, to discover when a process (in a goroutine) is done, ...