A producer-consumer solution for Golang.
Go is popular for its simplicity, builtin support for concurrency, light-weight goroutine. However, there are some tricks(here and there) when to coordinate among different goroutines, especially when implements producer-consumer pattern using buffered chan.
I don't want cover details here, guys who interested can check links above. But following cannot be emphasized too much:
Close chan is a
sender -> receiver
communication, not the reverse. #11344
- Inner buffer queue support RejectPolicy
- Graceful close implemented
If you have any suggestions/questions, open a PR.
There is a quickstart example , view the GoDoc for details.