Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 115 for interrupt (0.17 sec)

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

        waiter2.start();
        waiter2.awaitWaiting();
        // The waiter queue should be waiter2->waiter1
    
        // This should wake up waiter1 and cause the waiter1 node to be removed.
        waiter1.interrupt();
    
        waiter1.join();
        waiter2.awaitWaiting(); // should still be blocked
    
        LockSupport.unpark(waiter2); // spurious wakeup
        waiter2.awaitWaiting(); // should eventually re-park
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

            new Runnable() {
              @Override
              public void run() {
                try {
                  okayToRun.await();
                } catch (InterruptedException e) {
                  Thread.currentThread().interrupt();
                  throw new RuntimeException(e);
                }
                runCalled.getAndIncrement();
              }
            },
            directExecutor());
        Runnable execute =
            new Runnable() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

                }
              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
      int timeUncontendedExecute(int reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

                }
              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
      int timeUncontendedExecute(int reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

          }
    
          /** Checks if the state is {@link #CANCELLED} or {@link #INTERRUPTED}. */
          boolean isCancelled() {
            return (getState() & (CANCELLED | INTERRUPTED)) != 0;
          }
    
          /** Checks if the state is {@link #INTERRUPTED}. */
          boolean wasInterrupted() {
            return getState() == INTERRUPTED;
          }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 13.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

          }
    
          /** Checks if the state is {@link #CANCELLED} or {@link #INTERRUPTED}. */
          boolean isCancelled() {
            return (getState() & (CANCELLED | INTERRUPTED)) != 0;
          }
    
          /** Checks if the state is {@link #INTERRUPTED}. */
          boolean wasInterrupted() {
            return getState() == INTERRUPTED;
          }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 13.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        waiter2.start();
        waiter2.awaitWaiting();
        // The waiter queue should be waiter2->waiter1
    
        // This should wake up waiter1 and cause the waiter1 node to be removed.
        waiter1.interrupt();
    
        waiter1.join();
        waiter2.awaitWaiting(); // should still be blocked
    
        LockSupport.unpark(waiter2); // spurious wakeup
        waiter2.awaitWaiting(); // should eventually re-park
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/util/concurrent/AbstractFutureFootprintBenchmark.java

      @SuppressWarnings("FutureReturnValueIgnored")
      @Footprint(exclude = {Runnable.class, Executor.class, Thread.class, Exception.class})
      public Object measureSize() {
        for (Thread thread : blockedThreads) {
          thread.interrupt();
        }
        blockedThreads.clear();
        final Facade<Object> f = impl.newFacade();
        for (int i = 0; i < numThreads; i++) {
          Thread thread =
              new Thread() {
                @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Jan 17 15:34:54 GMT 2018
    - 3K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/util/concurrent/AbstractFutureFootprintBenchmark.java

      @SuppressWarnings("FutureReturnValueIgnored")
      @Footprint(exclude = {Runnable.class, Executor.class, Thread.class, Exception.class})
      public Object measureSize() {
        for (Thread thread : blockedThreads) {
          thread.interrupt();
        }
        blockedThreads.clear();
        final Facade<Object> f = impl.newFacade();
        for (int i = 0; i < numThreads; i++) {
          Thread thread =
              new Thread() {
                @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Jan 17 15:34:54 GMT 2018
    - 3K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

        assertEquals("foo", getChecked(immediateFuture("foo"), TwoArgConstructorException.class));
      }
    
      public void testGetCheckedUntimed_interrupted() {
        SettableFuture<String> future = SettableFuture.create();
        Thread.currentThread().interrupt();
        try {
          getChecked(future, TwoArgConstructorException.class);
          fail();
        } catch (TwoArgConstructorException expected) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
Back to top