semaphore

command
v0.0.0-...-23a64cd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: GPL-3.0 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