Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for currentThread (1.12 sec)

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

        // certain core jdk classes.
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(NO_UNSAFE);
        try {
          runTestMethod(NO_UNSAFE);
        } finally {
          Thread.currentThread().setContextClassLoader(oldClassLoader);
        }
    
        Thread.currentThread().setContextClassLoader(NO_ATOMIC_REFERENCE_FIELD_UPDATER);
        try {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/TestPlatform.java

          fail();
        } catch (TimeoutException expected) {
        } catch (ExecutionException e) {
          throw new AssertionError(e);
        }
      }
    
      static void verifyThreadWasNotInterrupted() {
        assertFalse(Thread.currentThread().isInterrupted());
      }
    
      static void clearInterrupt() {
        Thread.interrupted();
      }
    
      /**
       * Retrieves the result of a {@code Future} known to be done but uses the {@code get(long,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  3. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        assertThat(e).hasCauseThat().isInstanceOf(InterruptedException.class);
      }
    
      public void testAwait_CountDownLatch_Interrupted() {
        Interruptenator interruptenator = new Interruptenator(Thread.currentThread());
        try {
          final CountDownLatch latch = new CountDownLatch(1);
          RuntimeException expected =
              assertThrows(RuntimeException.class, () -> GcFinalization.await(latch));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        assertFalse(Thread.currentThread().isInterrupted());
        assertFalse(monitor.isOccupiedByCurrentThread());
    
        doEnterScenarioSetUp();
    
        boolean interruptedBeforeCall = Thread.currentThread().isInterrupted();
        Outcome actualOutcome = doCall();
        boolean occupiedAfterCall = monitor.isOccupiedByCurrentThread();
        boolean interruptedAfterCall = Thread.currentThread().isInterrupted();
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractFutureFallbackAtomicHelperTest.java

        // certain core jdk classes.
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(NO_UNSAFE);
        try {
          runTestMethod(NO_UNSAFE);
        } finally {
          Thread.currentThread().setContextClassLoader(oldClassLoader);
        }
    
        Thread.currentThread().setContextClassLoader(NO_ATOMIC_REFERENCE_FIELD_UPDATER);
        try {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

        assertFalse(Thread.currentThread().isInterrupted());
        assertFalse(monitor.isOccupiedByCurrentThread());
    
        doEnterScenarioSetUp();
    
        boolean interruptedBeforeCall = Thread.currentThread().isInterrupted();
        Outcome actualOutcome = doCall();
        boolean occupiedAfterCall = monitor.isOccupiedByCurrentThread();
        boolean interruptedAfterCall = Thread.currentThread().isInterrupted();
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/TestPlatform.java

          fail();
        } catch (TimeoutException expected) {
        } catch (ExecutionException e) {
          throw new AssertionError(e);
        }
      }
    
      static void verifyThreadWasNotInterrupted() {
        assertFalse(Thread.currentThread().isInterrupted());
      }
    
      static void clearInterrupt() {
        Thread.interrupted();
      }
    
      /**
       * Retrieves the result of a {@code Future} known to be done but uses the {@code get(long,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/TestThread.java

              }
            }
            return method;
          }
        }
        throw new NoSuchMethodError(methodName);
      }
    
      @Override
      public void run() {
        assertSame(this, Thread.currentThread());
        try {
          while (true) {
            Request request = requestQueue.take();
            Object result;
            try {
              result = invokeMethod(request.methodName, request.arguments);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      // NOTE: All durations in these tests are expressed in milliseconds
      @Override
      protected void setUp() {
        // Clear any previous interrupt before running the test.
        if (Thread.currentThread().isInterrupted()) {
          throw new AssertionError(
              "Thread interrupted on test entry. "
                  + "Some test probably didn't clear the interrupt state");
        }
    
        tearDownStack.addTearDown(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

         */
        Waiter(boolean unused) {}
    
        Waiter() {
          // avoid volatile write, write is made visible by subsequent CAS on waiters field
          ATOMIC_HELPER.putThread(this, Thread.currentThread());
        }
    
        // non-volatile write to the next field. Should be made visible by subsequent CAS on waiters
        // field.
        void setNext(@CheckForNull Waiter next) {
          ATOMIC_HELPER.putNext(this, next);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 63.1K bytes
    - Viewed (0)
Back to top