semaphore
semaphore copied to clipboard
goroutine leak
- [ ] https://github.com/kamilsk/semaphore/blob/master/channel.go#L42-L46
- [ ] https://github.com/kamilsk/semaphore/blob/master/context.go#L11-L12
- [ ] https://github.com/kamilsk/semaphore/blob/master/channel.go#L52-L63 - channel + cancel, because
time.Afteris bad - [ ] https://github.com/kamilsk/semaphore/blob/master/channel.go#L35-L49 - the same as above, because we don't need to listen signal when work is done
- [ ] investigate more
https://go101.org/article/concurrent-common-mistakes.html