Last active
April 24, 2017 10:44
-
-
Save phoorichet/c0a15303f8b4e52b0c3c5bc3e4a9f179 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
func main() { | |
// create fixed size queue | |
queue := producer(1000) | |
// create consumers to consume work in the queue | |
consumerCount := 10 | |
for i := 0; i < consumerCount; i++ { | |
go consumer(queue, i) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment