Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for isOccupiedByCurrentThread (0.09 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        assertFalse(monitor.isOccupiedByCurrentThread());
        monitor.enter();
        try {
          assertTrue(monitor.isOccupiedByCurrentThread());
    
          doWaitScenarioSetUp();
    
          boolean interruptedBeforeCall = Thread.currentThread().isInterrupted();
          Outcome actualOutcome = doCall();
          boolean occupiedAfterCall = monitor.isOccupiedByCurrentThread();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 27K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

          boolean expectedIsOccupiedByCurrentThread,
          int expectedOccupiedDepth) {
        assertEquals(expectedIsOccupied, monitor.isOccupied());
        assertEquals(expectedIsOccupiedByCurrentThread, monitor.isOccupiedByCurrentThread());
        assertEquals(expectedOccupiedDepth, monitor.getOccupiedDepth());
      }
    
      private static void verifyOccupiedMethodsInAnotherThread(
          Monitor monitor,
          boolean expectedIsOccupied,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/SupplementalMonitorTest.java

          boolean expectedIsOccupiedByCurrentThread,
          int expectedOccupiedDepth) {
        assertEquals(expectedIsOccupied, monitor.isOccupied());
        assertEquals(expectedIsOccupiedByCurrentThread, monitor.isOccupiedByCurrentThread());
        assertEquals(expectedOccupiedDepth, monitor.getOccupiedDepth());
      }
    
      private static void verifyOccupiedMethodsInAnotherThread(
          Monitor monitor,
          boolean expectedIsOccupied,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

        thread1.callAndAssertReturns(enterCount != 0, "isOccupied");
        thread1.callAndAssertReturns(enterCount != 0, "isOccupiedByCurrentThread");
        thread1.callAndAssertReturns(enterCount, "getOccupiedDepth");
    
        thread2.callAndAssertReturns(enterCount != 0, "isOccupied");
        thread2.callAndAssertReturns(false, "isOccupiedByCurrentThread");
        thread2.callAndAssertReturns(0, "getOccupiedDepth");
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. guava/src/com/google/common/util/concurrent/AbstractService.java

      }
    
      /**
       * Attempts to execute all the listeners in {@link #listeners} while not holding the {@link
       * #monitor}.
       */
      private void dispatchListenerEvents() {
        if (!monitor.isOccupiedByCurrentThread()) {
          listeners.dispatch();
        }
      }
    
      private void enqueueStartingEvent() {
        listeners.enqueue(STARTING_EVENT);
      }
    
      private void enqueueRunningEvent() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 19 21:24:11 UTC 2025
    - 20.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/AbstractService.java

      }
    
      /**
       * Attempts to execute all the listeners in {@link #listeners} while not holding the {@link
       * #monitor}.
       */
      private void dispatchListenerEvents() {
        if (!monitor.isOccupiedByCurrentThread()) {
          listeners.dispatch();
        }
      }
    
      private void enqueueStartingEvent() {
        listeners.enqueue(STARTING_EVENT);
      }
    
      private void enqueueRunningEvent() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 19 21:24:11 UTC 2025
    - 20.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

                }
              });
        }
    
        /** Attempts to execute all the listeners in {@link #listeners}. */
        void dispatchListenerEvents() {
          checkState(
              !monitor.isOccupiedByCurrentThread(),
              "It is incorrect to execute listeners with the monitor held.");
          listeners.dispatch();
        }
    
        @GuardedBy("monitor")
        void checkHealthy() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/Monitor.java

        return lock.isLocked();
      }
    
      /**
       * Returns whether the current thread is occupying this monitor (has entered more times than it
       * has left).
       */
      public boolean isOccupiedByCurrentThread() {
        return lock.isHeldByCurrentThread();
      }
    
      /**
       * Returns the number of times the current thread has entered this monitor in excess of the number
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 42.8K bytes
    - Viewed (0)
Back to top