Change TicketSemaphore acquire to enqueue directly instead of trying tryAcquire first

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • CAR Team 2026-04-13
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The current acquire path calls tryAcquire() before enqueueing: TicketHolder calls tryAcquire() and only then acquire(), and UnorderedTicketSemaphore::acquire() also starts with a tryAcquire() loop. This adds extra contention and complexity.

      Change the acquire path so that when a caller chooses to wait, it enqueues immediately without a prior tryAcquire(). Keep tryAcquire() as a separate non-blocking path for callers that want to avoid waiting.

            Assignee:
            Marcos José Grillo Ramirez
            Reporter:
            Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: