From 48601a4d7869a135fe059a80ec124fb7964fa32c Mon Sep 17 00:00:00 2001 From: Artem Skriabin Date: Tue, 5 Mar 2024 13:29:19 +0200 Subject: [PATCH] Log dead lock if such happens --- internal/pool/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/pool/main.go b/internal/pool/main.go index 56ab020..9de3213 100644 --- a/internal/pool/main.go +++ b/internal/pool/main.go @@ -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 }