Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for isOccupiedByCurrentThread (0.34 sec)

  1. 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();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 27.4K bytes
    - Viewed (0)
  2. 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(
          final Monitor monitor,
          boolean expectedIsOccupied,
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  3. 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();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
  4. 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");
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 8K bytes
    - Viewed (0)
  5. 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(
          final Monitor monitor,
          boolean expectedIsOccupied,
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  6. 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");
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  7. 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() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 18:32:03 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  8. 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() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 30.5K bytes
    - Viewed (0)
  9. android/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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
Back to top