docs: int acquireTransaction(@NotNull final Thread thread) {
          try (CriticalSection ignored = criticalSection.enter()) {
              final int currentThreadPermits = getThreadPermitsToAcquire(thread);
              waitForPermits(thread, currentThreadPermits > 0 ? nestedQueue : regularQueue, 1, currentThreadPermits);
          }
          return 1;
      }