Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Chui <echui@gitlab.com>2024-01-23 05:06:56 +0300
committerEmily Chui <echui@gitlab.com>2024-01-23 05:06:56 +0300
commit74e0569eb2971d26ef925b5931a4715696871a60 (patch)
tree2d33e96d8ae2d8d801125c37c33d513b19cef514
parentaf2e5e08d7ca9883d650ef6b2201d48ac75fe750 (diff)
Acquire to push to the front of the queuemaintenance/convert-limiter-queue-lifo
Change to LIFO strategy and push to the front of the queue instead of the back of the queue in FIFO strategy.
-rw-r--r--internal/limiter/resizable_semaphore.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/limiter/resizable_semaphore.go b/internal/limiter/resizable_semaphore.go
index 86bfb646d..ba340e662 100644
--- a/internal/limiter/resizable_semaphore.go
+++ b/internal/limiter/resizable_semaphore.go
@@ -69,7 +69,7 @@ func (s *resizableSemaphore) Acquire(ctx context.Context) error {
}
w := &waiter{ready: make(chan struct{})}
- element := s.waiters.PushBack(w)
+ element := s.waiters.PushFront(w)
s.Unlock()
select {