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.
Click to show internal directories.
Click to hide internal directories.