Commit graph

3 commits

Author SHA1 Message Date
cafa869fea
[#8] limiting: Make SemaphoreLimiter.Acquire() zero-alloc
Previously, `Acquire` on exising key did 1 allocation because
`func() { sem.Release() }` was a closure capturing different variables.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-02-26 18:03:41 +03:00
356851eed3
[#4] limiting/semaphore: Add benchmark for semaphore
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-13 15:50:59 +03:00
59fb93fb23
[#4] limiting: Add limiter
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-13 15:38:27 +03:00