/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...] |
/prebuilts/eclipse/mavenplugins/tycho/tycho-dependencies-m2repo/org/eclipse/tycho/tycho-bundles-external/0.20.0/eclipse/plugins/ |
org.eclipse.equinox.concurrent_1.1.0.v20130327-1442.jar | |
/prebuilts/tools/common/m2/repository/org/eclipse/tycho/tycho-bundles-external/0.18.1/eclipse/plugins/ |
org.eclipse.equinox.concurrent_1.1.0.v20130327-1442.jar | |
/external/glide/library/src/main/java/com/bumptech/glide/volley/ |
VolleyStreamFetcher.java | 78 private final VolleyRequestFuture<InputStream> future; field in class:VolleyStreamFetcher.GlideRequest 81 public GlideRequest(String url, VolleyRequestFuture<InputStream> future, Priority priority) { 82 super(Method.GET, url, future); 83 this.future = future; 99 future.onResponse(new ByteArrayInputStream(response));
|
/external/libcxx/src/ |
future.cpp | 1 //===------------------------- future.cpp ---------------------------------===// 10 #include "future" 26 return "future"; 47 return string("The future has already been retrieved from " 190 future<void>::future(__assoc_sub_state* __state) function in class:future 201 future<void>::~future() 208 future<void>::get() 233 future<void [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/src/ |
future.cpp | 1 //===------------------------- future.cpp ---------------------------------===// 10 #include "future" 28 return "future"; 49 return string("The future has already been retrieved from " 192 future<void>::future(__assoc_sub_state* __state) function in class:future 203 future<void>::~future() 210 future<void>::get() 235 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 | 23 #include "Future.h" 37 Task(): mFuture(new Future<T>()) { } 50 const sp<Future<T> >& future() const { function in class:android::uirenderer::Task 55 sp<Future<T> > mFuture;
|
/packages/apps/Email/tests/src/com/android/email/ |
AccountTestCase.java | 87 AccountManagerFuture<Boolean> future = local 90 future.getResult();
|
/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 | 75 AccountManagerFuture<Bundle> future = accountManager.getAuthToken(mAccount, local 79 result = future.getResult(); 84 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...] |
/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;
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
AbstractExecutorServiceTest.java | 49 Future<?> future = e.submit(task); local 50 assertNull(future.get()); 51 assertNull(future.get(0, MILLISECONDS)); 53 assertTrue(future.isDone()); 54 assertFalse(future.isCancelled()); 62 Future<String> future = e.submit(new StringTask()); local 63 String result = future.get(); 72 Future<?> future = e.submit(new NoOpRunnable()) local 82 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); local [all...] |