/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
ListenableFutureTester.java | 32 * Used to test listenable future implementations. 39 private final ListenableFuture<?> future; field in class:ListenableFutureTester 42 public ListenableFutureTester(ListenableFuture<?> future) { 44 this.future = future; 49 future.addListener(new Runnable() { 56 assertFalse(future.isDone()); 57 assertFalse(future.isCancelled()); 66 assertTrue(future.isDone()); 67 assertFalse(future.isCancelled()) [all...] |
SettableFutureTest.java | 31 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.cancel(true)) [all...] |
AbstractFutureTest.java | 47 AbstractFuture<String> future = new AbstractFuture<String>() { local 53 ExecutionException ee1 = getExpectingExecutionException(future); 54 ExecutionException ee2 = getExpectingExecutionException(future); 67 InterruptibleFuture future = new InterruptibleFuture(); local 68 assertTrue(future.cancel(false)); 69 assertTrue(future.isCancelled()); 70 assertTrue(future.isDone()); 71 assertFalse(future.wasInterrupted); 75 InterruptibleFuture future = new InterruptibleFuture(); local 76 assertTrue(future.cancel(true)) 83 AbstractFuture<String> future = new AbstractFuture<String>() { local 96 final AbstractFuture<String> future = new AbstractFuture<String>() {}; local [all...] |
MoreExecutorsTest.java | 35 import java.util.concurrent.Future; 72 Future<?> future = executor.submit(incrementTask); 73 assertTrue(future.isDone()); 83 ListenableFuture<?> future = executor.submit(incrementTask); local 84 assertTrue(future.isDone()); 85 assertListenerRunImmediately(future); 113 List<Future<Integer>> futures = 117 Future<Integer> future = futures.get(i) local [all...] |
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/ |
MockFutureListener.java | 39 private final ListenableFuture<?> future; field in class:MockFutureListener 41 public MockFutureListener(ListenableFuture<?> future) { 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();
|
AbstractCheckedFutureTest.java | 70 final CheckedFuture<Boolean, ?> future = local 73 assertFalse(future.isDone()); 74 assertFalse(future.isCancelled()); 79 future.cancel(true); 84 future.checkedGet(); 90 assertTrue(future.isDone()); 91 assertTrue(future.isCancelled()); 97 final CheckedFuture<Boolean, ?> future = local 103 assertFalse(future.isDone()); 104 assertFalse(future.isCancelled()) 134 final CheckedFuture<Boolean, ?> future = local [all...] |
AbstractListenableFutureTest.java | 29 import java.util.concurrent.Future; 44 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 69 * Tests that the {@link Future#get()} method blocks until a value is 74 assertFalse(future.isDone()); 75 assertFalse(future.isCancelled()); 80 // Wait on the future in a separate thread. 85 assertSame(Boolean.TRUE, future.get()) [all...] |
/external/guava/guava/src/com/google/common/util/concurrent/ |
Futures.java | 47 import java.util.concurrent.Future; 56 * Static utility methods pertaining to the {@link Future} interface. 75 * See {@link Future#get()} for details on the exceptions thrown. 80 ListenableFuture<V> future, Function<Exception, X> mapper) { 81 return new MappingCheckedFuture<V, X>(checkNotNull(future), mapper); 86 * construction. The getters just return the value. This {@code Future} can't 91 SettableFuture<V> future = SettableFuture.create(); local 92 future.set(value); 93 return future; 100 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone() 106 SettableFuture<V> future = SettableFuture.create(); local [all...] |
SimpleTimeLimiter.java | 35 import java.util.concurrent.Future; 126 Future<T> future = executor.submit(callable); local 130 return future.get(timeoutDuration, timeoutUnit); 132 future.cancel(true); 136 return Uninterruptibles.getUninterruptibly(future, 142 future.cancel(true);
|
/frameworks/ex/variablespeed/tests/src/com/android/ex/variablespeed/ |
RealMediaPlayerTest.java | 40 FutureTask<MediaPlayer> future = new FutureTask<MediaPlayer>(callable); local 41 getInstrumentation().runOnMainSync(future); 42 return DynamicProxy.dynamicProxy(MediaPlayerProxy.class, future.get(1, TimeUnit.SECONDS));
|
/external/robolectric/src/test/java/com/xtremelabs/robolectric/util/ |
RobolectricBackgroundExecutorServiceTest.java | 10 import java.util.concurrent.Future; 47 Future<String> future = executorService.submit(runnable, "foo"); local 50 assertFalse(future.isDone()); 54 assertTrue(future.isDone()); 56 assertEquals("foo", future.get()); 61 Future<String> future = executorService.submit(new Callable<String>() { local 69 assertFalse(future.isDone()); 73 assertTrue(future.isDone()) [all...] |
/ndk/sources/cxx-stl/llvm-libc++/src/ |
future.cpp | 1 //===------------------------- future.cpp ---------------------------------===// 10 #include "future" 26 return "future"; 38 return string("The future has already been retrieved from " 175 future<void>::future(__assoc_sub_state* __state) function in class:future 186 future<void>::~future() 193 future<void>::get() 218 future<void [all...] |
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/ |
AccountManagerTest.java | 45 AccountManagerFuture<Bundle> future = local 48 assertThat(future.isCancelled(), equalTo(false)); 49 future.cancel(true); 50 assertThat(future.isCancelled(), equalTo(true)); 55 AccountManagerFuture<Bundle> future = local 58 assertThat(future.isDone(), equalTo(false)); 59 future.cancel(true); 60 assertThat(future.isDone(), equalTo(true)); 65 AccountManagerFuture<Bundle> future = local 68 assertThat(future.isDone(), equalTo(false)) 81 AccountManagerFuture<Bundle> future = local 92 AccountManagerFuture<Bundle> future = local [all...] |
/frameworks/base/libs/hwui/thread/ |
Task.h | 25 #include "Future.h" 39 Task(): mFuture(new Future<T>()) { } 52 const sp<Future<T> >& future() const { function in class:android::uirenderer::Task 57 sp<Future<T> > mFuture;
|
/packages/apps/Email/tests/src/com/android/email/ |
AccountTestCase.java | 85 AccountManagerFuture<Boolean> future = local 88 future.getResult();
|
/external/chromium/chrome/browser/safe_browsing/ |
protocol_manager_unittest.cc | 115 Time future = now + TimeDelta::FromMinutes(1); local 116 EXPECT_TRUE(pm.next_gethash_time_ >= future - margin && 117 pm.next_gethash_time_ <= future + margin);
|
safe_browsing_store_unittest.cc | 263 const base::Time future = now + base::TimeDelta::FromDays(3*365); local 266 EXPECT_GT(static_cast<int32>(future.ToTimeT()), 0)
|
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowAsyncTask.java | 22 private final FutureTask<Result> future; field in class:ShadowAsyncTask 28 future = new FutureTask<Result>(worker) { 57 return future.isCancelled(); 62 return future.cancel(mayInterruptIfRunning); 67 return future.get(); 72 return future.get(timeout, unit); 84 future.run();
|
/frameworks/volley/src/com/android/volley/toolbox/ |
AndroidAuthenticator.java | 73 AccountManagerFuture<Bundle> future = accountManager.getAuthToken(mAccount, local 77 result = future.getResult(); 82 if (future.isDone() && !future.isCancelled()) {
|
/external/guava/guava-tests/test/com/google/common/testing/ |
GcFinalizationTest.java | 39 final SettableFuture<Void> future = SettableFuture.create(); local 41 protected void finalize() { future.set(null); } 44 GcFinalization.awaitDone(future); 45 assertTrue(future.isDone()); 46 assertFalse(future.isCancelled()); 50 final SettableFuture<Void> future = SettableFuture.create(); local 52 protected void finalize() { future.cancel(false); } 55 GcFinalization.awaitDone(future); 56 assertTrue(future.isDone()); 57 assertTrue(future.isCancelled()) 130 final SettableFuture<Void> future = SettableFuture.create(); local [all...] |
/external/clang/test/SemaCXX/ |
linkage2.cpp | 59 class future { class in namespace:test6 63 template <class _Rp> future<_Rp> 67 shared_future(future<_Rp&>&& __f); // expected-warning {{rvalue references are a C++11 extension}}
|
/frameworks/base/libs/usb/src/com/android/future/usb/ |
UsbAccessory.java | 17 package com.android.future.usb;
|
UsbManager.java | 18 package com.android.future.usb;
|
/frameworks/base/core/tests/coretests/src/android/animation/ |
AutoCancelTest.java | 59 private void setupAnimators(long startDelay, boolean startLater, final FutureWaiter future) 82 future.set(false); 96 future.set(false); 103 // Release future if not done already via failures during start 104 future.release(); 125 final FutureWaiter future = new FutureWaiter(); local 130 setupAnimators(0, false, future); 132 future.setException(e); 136 assertTrue(future.get(FUTURE_TIMEOUT, TimeUnit.MILLISECONDS)); 141 final FutureWaiter future = new FutureWaiter() local 157 final FutureWaiter future = new FutureWaiter(); local 173 final FutureWaiter future = new FutureWaiter(); local [all...] |
/packages/apps/Exchange/exchange2/tests/src/com/android/exchange/ |
CalendarSyncEnablerTest.java | 251 AccountManagerFuture<Boolean> future = local 254 future.getResult();
|