code: 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;
      }
docs: Acquire transaction with a single permit in a thread. Transactions are acquired reentrantly, i.e.
  with respect to transactions already acquired in the thread.
  
  @return the number of acquired permits, identically equal to 1.