Closed kamilsk closed 5 years ago
time.NewTimer
instead of time.After
: investigate "under the hood" benefits (related to GC)
time.After
do not release app resource, but timer
can do it
timer := time.NewTimer(deadline)
semaphore.Acquire(timer.C)
if ok -> timer.Stop() and continue
won't do
need to define overhead of the package