Skip to content

Commit

Permalink
Log dead lock if such happens
Browse files Browse the repository at this point in the history
  • Loading branch information
artemskriabin committed Mar 5, 2024
1 parent 377383a commit 48601a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/pool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func (p *Pool) Add(id string) error {
defer p.mu.Unlock()

if _, ok := p.index[id]; !ok {
if len(p.rawOrder) == poolSz {
p.log.Error("[Pool] DEAD LOCK REACHED LIMIT OF THE CHANNEL IN THE MUTEX")
}
p.index[id] = struct{}{}
p.rawOrder <- id
}
Expand Down

0 comments on commit 48601a4

Please sign in to comment.