Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 150 for _wait (0.15 sec)

  1. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

       */
      public void assertSuccess(Object expectedData) throws Throwable {
        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          Assert.assertEquals(expectedData, future.get());
        } catch (ExecutionException e) {
          throw e.getCause();
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
        // Verify that all of the runnables execute in a reasonable amount of time.
        assertTrue(countDownLatch.await(1L, TimeUnit.SECONDS));
      }
    
      public void testExecute_idempotent() {
        final AtomicInteger runCalled = new AtomicInteger();
        list.add(
            new Runnable() {
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/util/transport/Transport.java

                te = null;
                thread = new Thread( this, name );
                thread.setDaemon( true );
    
                synchronized (thread) {
                    thread.start();
                    thread.wait( timeout );          /* wait for doConnect */
    
                    switch (state) {
                        case 1: /* doConnect never returned */
                            state = 0;
                            thread = null;
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 9K bytes
    - Viewed (0)
  4. src/main/java/jcifs/util/transport/Transport.java

                            continue;
                        }
    
                        curResp.wait();
                        if ( handleIntermediate(request, curResp) ) {
                            continue;
                        }
                        if ( log.isDebugEnabled() ) {
                            log.debug("Wait returned state is " + this.state);
                        }
                        if ( isDisconnected() ) {
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Nov 01 18:12:21 GMT 2020
    - 24.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

        return queryEarliestAvailable(nowMicros) - timeoutMicros <= nowMicros;
      }
    
      /**
       * Reserves next ticket and returns the wait time that the caller must wait for.
       *
       * @return the required wait time, never negative
       */
      final long reserveAndGetWaitLength(int permits, long nowMicros) {
        long momentAvailable = reserveEarliestAvailable(permits, nowMicros);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 18.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

          queue.enqueue(incrementingEvent(counters, listener, 4));
          queue.enqueue(countDownEvent(latch));
          assertEquals(0, counters.size());
          queue.dispatch();
          latch.await();
          assertEquals(multiset(listener, 4), counters);
        } finally {
          service.shutdown();
        }
      }
    
      public void testEnqueueAndDispatch_multithreaded_withThrowingRunnable()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

              }
            };
        waiter.start();
        service.startAsync().awaitRunning();
        assertEquals(State.RUNNING, service.state());
        service.stopAsync();
        waiter.join(LONG_TIMEOUT_MILLIS); // ensure that the await in the other thread is triggered
        assertFalse(waiter.isAlive());
      }
    
      public void testAwaitTerminated_FailedService() throws Exception {
        final ManualSwitchedService service = new ManualSwitchedService();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  8. maven-core/src/test/java/org/apache/maven/plugin/internal/DefaultLegacySupportTest.java

        }
    
        class MyRunnable implements Runnable {
    
            private volatile MavenSession session;
    
            public void run() {
                try {
                    latch.await();
                } catch (InterruptedException ignore) {
                    // Test may fail if we get interrupted
                }
                session = defaultLegacySupport.getSession();
            }
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

          throws TimeoutException, ExecutionException {
        SettableFuture<String> future = SettableFuture.create();
        future.set(RESULT);
        /*
         * getUninterruptibly should call the timed get method once with a
         * wait of 0 seconds (and it should succeed, since the result is already
         * available).
         */
        assertEquals(RESULT, getUninterruptibly(future, 0, SECONDS));
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

          loader.reset();
          assertEquals(Integer.valueOf(VALUE_PREFIX + i), cache.getUnchecked(KEY_PREFIX + i));
          assertFalse("Loader should NOT have been called @#" + i, loader.wasCalled());
        }
    
        // wait for entries to expire, but don't call expireEntries
        ticker.advance(EXPIRING_TIME * 10, MILLISECONDS);
    
        // add a single unexpired entry
        cache.getUnchecked(KEY_PREFIX + 11);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
Back to top