semaphore

command
v0.0.0-...-fe83630 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

This sample program demonstrates how to implement a semaphore using channels that can allow multiple reads but a single write.

It uses the generator pattern to create channels and goroutines.

Multiple reader/writers can be created and run concurrently. Then after a timeout period, the program shutdowns cleanly.

http://www.golangpatterns.info/concurrency/semaphores

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL