Searched defs:future (Results 1 - 25 of 25) sorted by relevance

/external/guava/guava-testlib/src/com/google/common/testing/
H A DGcFinalization.java110 * Waits until the given future {@linkplain Future#isDone is done}, invoking the garbage
115 public static void awaitDone(Future<?> future) { argument
116 if (future.isDone()) {
123 if (future.isDone()) {
128 future.get(1L, SECONDS);
135 throw new RuntimeException("Unexpected interrupt while waiting for future", ie);
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
H A DMockFutureListener.java39 private final ListenableFuture<?> future; field in class:MockFutureListener
41 public MockFutureListener(ListenableFuture<?> future) { argument
43 this.future = future;
45 future.addListener(this, MoreExecutors.sameThreadExecutor());
55 * Asserts that the future returns the expected data.
64 Assert.assertEquals(expectedData, future.get());
72 * Asserts that the future throws an {@code ExecutableException} and that the
80 future.get();
H A DAbstractListenableFutureTest.java44 protected ListenableFuture<Boolean> future; field in class:AbstractListenableFutureTest
49 // Create a latch and a future that waits on the latch.
51 future = createListenableFuture(Boolean.TRUE, null, latch);
62 * Constructs a listenable future with a value available after the latch
74 assertFalse(future.isDone());
75 assertFalse(future.isCancelled());
80 // Wait on the future in a separate thread.
85 assertSame(Boolean.TRUE, future.get());
93 // Release the future value.
102 assertTrue(future
[all...]
/external/guava/guava-tests/test/com/google/common/util/concurrent/
H A DListenableFutureTester.java32 * Used to test listenable future implementations.
39 private final ListenableFuture<?> future; field in class:ListenableFutureTester
42 public ListenableFutureTester(ListenableFuture<?> future) { argument
44 this.future = future;
49 future.addListener(new Runnable() {
56 assertFalse(future.isDone());
57 assertFalse(future.isCancelled());
66 assertTrue(future.isDone());
67 assertFalse(future
[all...]
H A DMoreExecutorsTest.java72 Future<?> future = executor.submit(incrementTask);
73 assertTrue(future.isDone());
83 ListenableFuture<?> future = executor.submit(incrementTask);
84 assertTrue(future.isDone());
85 assertListenerRunImmediately(future);
117 Future<Integer> future = futures.get(i);
118 assertTrue("Task should have been run before being returned", future.isDone());
119 assertEquals(i, future.get().intValue());
139 Future<?> future = executor.submit(new Callable<Void>() {
155 assertTrue(future
225 assertListenerRunImmediately(ListenableFuture<?> future) argument
[all...]
H A DSettableFutureTest.java31 private SettableFuture<String> future; field in class:SettableFutureTest
38 future = SettableFuture.create();
39 tester = new ListenableFutureTester(future);
45 future.get(5, TimeUnit.MILLISECONDS);
51 assertTrue(future.set("value"));
56 assertTrue(future.setException(new Exception("failure")));
62 future.setException(null);
66 assertFalse(future.isDone());
67 assertTrue(future.setException(new Exception("failure")));
72 assertTrue(future
[all...]
H A DAbstractFutureTest.java47 AbstractFuture<String> future = new AbstractFuture<String>() {
53 ExecutionException ee1 = getExpectingExecutionException(future);
54 ExecutionException ee2 = getExpectingExecutionException(future);
67 InterruptibleFuture future = new InterruptibleFuture();
68 assertTrue(future.cancel(false));
69 assertTrue(future.isCancelled());
70 assertTrue(future.isDone());
71 assertFalse(future.wasInterrupted);
75 InterruptibleFuture future = new InterruptibleFuture();
76 assertTrue(future
165 getExpectingExecutionException( AbstractFuture<String> future) argument
[all...]
H A DAbstractScheduledServiceTest.java45 volatile ScheduledFuture<?> future = null; field in class:AbstractScheduledServiceTest
55 return future = super.scheduleWithFixedDelay(command, initialDelay, delay, unit);
62 assertFalse(future.isDone());
64 assertTrue(future.isCancelled());
82 future.get();
304 Future<?> future = scheduler.schedule(null, Executors.newScheduledThreadPool(10), task);
312 future.cancel(false);
H A DJSR166TestCase.java290 * milliseconds in the future.
560 * Checks that future.get times out, with the default timeout of
563 void assertFutureTimesOut(Future future) { argument
564 assertFutureTimesOut(future, timeoutMillis());
568 * Checks that future.get times out, with the given millisecond timeout.
570 void assertFutureTimesOut(Future future, long timeoutMillis) { argument
573 future.get(timeoutMillis, MILLISECONDS);
578 } finally { future.cancel(true); }
H A DFuturesTest.java85 * Clear interrupt for future tests.
96 ListenableFuture<String> future = Futures.immediateFuture(DATA1);
99 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS));
113 ListenableFuture<String> future =
117 future.get(0L, TimeUnit.MILLISECONDS);
128 CheckedFuture<String, MyException> future = Futures.immediateCheckedFuture(
132 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS));
133 assertSame(DATA1, future.checkedGet(0L, TimeUnit.MILLISECONDS));
151 CheckedFuture<String, MyException> future =
155 future
728 final ListenableFuture<String> future; field in class:FuturesTest.TestFuture
732 TestFuture( ListenableFuture<String> future, String name, Runnable finisher) argument
1079 conditionalPseudoTimedGet( TestFutureBatch inputs, ListenableFuture<String> iFuture, ListenableFuture<String> jFuture, ListenableFuture<List<String>> future, int timeout, TimeUnit unit) argument
[all...]
/external/chromium/chrome/browser/safe_browsing/
H A Dprotocol_manager_unittest.cc115 Time future = now + TimeDelta::FromMinutes(1); local
116 EXPECT_TRUE(pm.next_gethash_time_ >= future - margin &&
117 pm.next_gethash_time_ <= future + margin);
H A Dsafe_browsing_store_unittest.cc263 const base::Time future = now + base::TimeDelta::FromDays(3*365); local
266 EXPECT_GT(static_cast<int32>(future.ToTimeT()), 0)
/external/guava/guava/src/com/google/common/util/concurrent/
H A DJdkFutureAdapters.java45 * <p><b>Warning:</b> If the input future does not already implement {@link
46 * ListenableFuture}, the returned future will emulate {@link
49 * until the future is {@linkplain Future#isDone() done}.
59 Future<V> future) {
60 if (future instanceof ListenableFuture<?>) {
61 return (ListenableFuture<V>) future;
63 return new ListenableFutureAdapter<V>(future);
68 Future<V> future, Executor executor) {
70 if (future instanceof ListenableFuture<?>) {
71 return (ListenableFuture<V>) future;
58 listenInPoolThread( Future<V> future) argument
67 listenInPoolThread( Future<V> future, Executor executor) argument
[all...]
H A DUninterruptibles.java118 * Invokes {@code future.}{@link Future#get() get()} uninterruptibly.
126 public static <V> V getUninterruptibly(Future<V> future) argument
132 return future.get();
146 * {@code future.}{@link Future#get(long, TimeUnit) get(timeout, unit)}
154 Future<V> future, long timeout, TimeUnit unit)
164 return future.get(remainingNanos, NANOSECONDS);
153 getUninterruptibly( Future<V> future, long timeout, TimeUnit unit) argument
H A DFutures.java80 ListenableFuture<V> future, Function<Exception, X> mapper) {
81 return new MappingCheckedFuture<V, X>(checkNotNull(future), mapper);
91 SettableFuture<V> future = SettableFuture.create();
92 future.set(value);
93 return future;
106 SettableFuture<V> future = SettableFuture.create();
107 future.set(value);
108 return Futures.makeChecked(future, new Function<Exception, X>() {
130 SettableFuture<V> future = SettableFuture.create();
131 future
79 makeChecked( ListenableFuture<V> future, Function<Exception, X> mapper) argument
444 transform(ListenableFuture<I> future, final Function<? super I, ? extends O> function) argument
497 transform(ListenableFuture<I> future, final Function<? super I, ? extends O> function, Executor executor) argument
534 lazyTransform(final Future<I> future, final Function<? super I, ? extends O> function) argument
704 cancel(@ullable Future<?> future, boolean mayInterruptIfRunning) argument
913 addCallback(ListenableFuture<V> future, FutureCallback<? super V> callback) argument
965 addCallback(final ListenableFuture<V> future, final FutureCallback<? super V> callback, Executor executor) argument
1036 get( Future<V> future, Class<X> exceptionClass) argument
1102 get( Future<V> future, long timeout, TimeUnit unit, Class<X> exceptionClass) argument
1172 getUnchecked(Future<V> future) argument
1352 setOneValue(int index, Future<? extends V> future) argument
[all...]
/external/antlr/antlr-3.4/runtime/Ruby/lib/antlr3/
H A Dstreams.rb361 non-ASCII encoding. However, encoding-savvy recognition code is a future
904 @position = future?( 2 ) || @tokens.length
933 index = future?( k ) or return nil
946 def future?( k = 1 )
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/
H A DOutputStreamTesterTest.java116 private Future<byte[]> future; field in class:OutputStreamTesterTest.PipedOutputStreamSinkTester
123 future = executor.submit(new Callable<byte[]>() {
140 return future.get();
H A DWriterTesterTest.java105 private Future<char[]> future; field in class:WriterTesterTest.PipedWriterCharSinkTester
112 future = executor.submit(new Callable<char[]>() {
129 return future.get();
/external/clang/test/SemaTemplate/
H A Dfriend-template.cpp250 template<typename> class future { class in struct:RedeclUnrelated::S
253 future<void> share;
/external/chromium/base/
H A Dmessage_pump_glib_unittest.cc72 base::Time future = last_time + base::TimeDelta::FromMilliseconds(delay_ms); local
73 EventInjector::Event event = { future, task };
/external/skia/src/animator/
H A DSkAnimateActive.cpp429 SkMSec future = fAnimators[index]->fStart + state.fStartTime; local
430 if (future > fMaker.fEnableTime)
431 fMaker.notifyInvalTime(future);
436 debugOut.appendS32(future - fMaker.fDebugTimeBase);
/external/guava/guava/src/com/google/common/cache/
H A DLocalCache.java3534 private static boolean setException(SettableFuture<?> future, Throwable t) { argument
3536 return future.setException(t);
3544 SettableFuture<V> future = SettableFuture.create();
3545 setException(future, t);
3546 return future;
3560 // TODO(fry): could also cancel loading if we had a handle on its future
/external/e2fsprogs/lib/blkid/
H A Dprobe.h206 __u32 future; member in struct:cramfs_super_block
662 * to allowr for stripe alignment in the future
723 /* future expansion */
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/
H A Dcom.ibm.icu_4.2.1.v20100412.jarMETA-INF/MANIFEST.MF META-INF/ECLIPSEF.SF META-INF/ECLIPSEF.RSA META ...
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.apache.ant_1.7.1.v20090120-1145/lib/
H A Dant.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/apache/ org/apache/tools/ org/apache/tools/ant/ ...

Completed in 3521 milliseconds