HomeSort by relevance Sort by last modified time
    Searched defs:future (Results 1 - 25 of 576) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/guava/guava-tests/test/com/google/common/util/concurrent/
ListenableFutureTester.java 35 * Used to test listenable future implementations.
42 private final ListenableFuture<?> future; field in class:ListenableFutureTester
45 public ListenableFutureTester(ListenableFuture<?> future) {
47 this.future = checkNotNull(future);
52 future.addListener(new Runnable() {
59 assertFalse(future.isDone());
60 assertFalse(future.isCancelled());
69 assertTrue(future.isDone());
70 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...]
AsyncSettableFutureTest.java 36 /** Tests the initial state of the future. */
38 AsyncSettableFuture<Integer> future = AsyncSettableFuture.create(); local
39 assertFalse(future.isSet());
40 assertFalse(future.isDone());
41 assertFalse(future.isCancelled());
45 AsyncSettableFuture<Integer> future = AsyncSettableFuture.create(); local
46 assertTrue(future.setValue(42));
47 assertTrue(future.isSet());
48 // Later attempts to set the future should return false.
49 assertFalse(future.setValue(23))
59 AsyncSettableFuture<Object> future = AsyncSettableFuture.create(); local
79 AsyncSettableFuture<String> future = AsyncSettableFuture.create(); local
101 AsyncSettableFuture<Foo> future = AsyncSettableFuture.create(); local
    [all...]
AbstractFutureTest.java 48 AbstractFuture<String> future = new AbstractFuture<String>() { local
54 ExecutionException ee1 = getExpectingExecutionException(future);
55 ExecutionException ee2 = getExpectingExecutionException(future);
68 InterruptibleFuture future = new InterruptibleFuture(); local
69 assertTrue(future.cancel(false));
70 assertTrue(future.isCancelled());
71 assertTrue(future.isDone());
72 assertFalse(future.wasInterrupted());
73 assertFalse(future.interruptTaskWasCalled);
75 future.get()
83 InterruptibleFuture future = new InterruptibleFuture(); local
98 AbstractFuture<String> future = new AbstractFuture<String>() { local
111 final AbstractFuture<String> future = new AbstractFuture<String>() {}; local
    [all...]
  /system/bt/osi/test/
future_test.cc 23 #include "osi/include/future.h"
38 future_t* future = future_new(); local
39 ASSERT_TRUE(future != NULL);
42 thread_post(worker_thread, post_to_future, future);
44 EXPECT_EQ(pass_back_data0, future_await(future));
50 future_t* future = future_new_immediate((void*)pass_back_data1); local
51 ASSERT_TRUE(future != NULL);
52 EXPECT_EQ(pass_back_data1, future_await(future));
  /external/dagger2/producers/src/test/java/dagger/producers/internal/
SetProducerTest.java 49 ListenableFuture<Set<Integer>> future = producer.get(); local
51 future.get();
63 ListenableFuture<Set<Integer>> future = producer.get(); local
65 future.get();
AbstractProducerTest.java 95 ListenableFuture<Integer> future = producer.get(); local
96 assertThat(future.isDone()).isFalse();
99 assertThat(future.get()).isEqualTo(-42);
109 ListenableFuture<Integer> future = producer.get(); local
110 assertThat(future.isDone()).isFalse();
115 future.get();
  /external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
MockFutureListener.java 40 private final ListenableFuture<?> future; field in class:MockFutureListener
42 public MockFutureListener(ListenableFuture<?> future) {
44 this.future = future;
46 future.addListener(this, directExecutor());
56 * Asserts that the future returns the expected data.
65 Assert.assertEquals(expectedData, future.get());
73 * Asserts that the future throws an {@code ExecutableException} and that the
81 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/robolectric/v1/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/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 
  /libcore/ojluni/src/main/java/sun/nio/ch/
Invoker.java 280 static <V,A> void invokeUnchecked(PendingFuture<V,A> future) {
281 assert future.isDone();
282 CompletionHandler<V,? super A> handler = future.handler();
285 future.attachment(),
286 future.value(),
287 future.exception());
296 static <V,A> void invoke(PendingFuture<V,A> future) {
297 assert future.isDone();
298 CompletionHandler<V,? super A> handler = future.handler();
300 invoke(future.channel()
    [all...]
  /external/guava/guava-testlib/test/com/google/common/util/concurrent/testing/
TestingExecutorsTest.java 29 import java.util.concurrent.Future;
48 ScheduledFuture<?> future = TestingExecutors.noOpScheduledExecutor().schedule( local
52 assertFalse(future.isDone());
73 List<Future<Boolean>> futureList = executor.invokeAll(
75 Future<Boolean> future = futureList.get(0); local
77 assertTrue(future.isDone());
79 future.get();
94 Future<Integer> future = TestingExecutors.sameThreadScheduledExecutor().schedule local
107 Future<?> future = TestingExecutors.sameThreadScheduledExecutor().submit(runnable); local
    [all...]
  /external/libcxx/src/
future.cpp 1 //===------------------------- future.cpp ---------------------------------===//
14 #include "future"
30 return "future";
51 return string("The future has already been retrieved from "
189 future<void>::future(__assoc_sub_state* __state) function in class:future
200 future<void>::~future()
207 future<void>::get()
234 future<void
    [all...]
  /packages/apps/Dialer/java/com/android/voicemail/impl/sync/
VvmNetworkRequest.java 30 import java.util.concurrent.Future;
84 VvmLog.e(TAG, "can't get future network", e);
95 private final CompletableFuture<NetworkWrapper> future = new CompletableFuture<>(); field in class:VvmNetworkRequest.FutureNetworkRequestCallback
104 public Future<NetworkWrapper> getFuture() {
105 return future;
111 future.complete(new NetworkWrapper(network, this));
117 future.complete(null);
  /prebuilts/ndk/r16/sources/cxx-stl/llvm-libc++/src/
future.cpp 1 //===------------------------- future.cpp ---------------------------------===//
14 #include "future"
30 return "future";
51 return string("The future has already been retrieved from "
189 future<void>::future(__assoc_sub_state* __state) function in class:future
200 future<void>::~future()
207 future<void>::get()
234 future<void
    [all...]
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/
future.c 10 #define UNDEFINED_FUTURE_FEATURE "future feature %.100s is not defined"
62 static PyObject *future; local
63 if (!future) {
64 future = PyString_InternFromString("__future__");
65 if (!future)
72 /* A subsequent pass will detect future imports that don't
75 joined by semi-colons, where the first import is a future
76 statement but some subsequent import has the future form
89 still possible to find a future statement. The only things
90 that can precede a future statement are another future
    [all...]
  /external/robolectric/v1/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...]
  /external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
ShadowAsyncTaskLoader.java 24 FutureTask<D> future = new FutureTask<D>(worker) { local
43 ShadowApplication.getInstance().getBackgroundThreadScheduler().post(future);
  /external/robolectric-shadows/shadows/supportv4/src/main/java/org/robolectric/shadows/support/v4/
ShadowAsyncTaskLoader.java 25 FutureTask<D> future = new FutureTask<D>(worker) { local
41 Robolectric.getBackgroundThreadScheduler().post(future);
  /external/sl4a/Utils/src/com/googlecode/android_scripting/future/
FutureResult.java 17 package com.googlecode.android_scripting.future;
20 import java.util.concurrent.Future;
27 public class FutureResult<T> implements Future<T> {
  /frameworks/base/libs/hwui/thread/
Task.h 23 #include "Future.h"
37 Task() : mFuture(new Future<T>()) {}
45 const sp<Future<T> >& future() const { return mFuture; } function in class:android::uirenderer::Task
48 sp<Future<T> > mFuture;
  /frameworks/base/services/core/jni/
com_android_server_ArcVideoService.cpp 32 #include <arc/Future.h>
42 void onCaptureResult(arc::Future<arc::MojoBootstrapResult>* future, uint32_t version,
49 future->set(arc::MojoBootstrapResult());
54 future->set(arc::MojoBootstrapResult(std::move(fd), token, version));
109 Future<MojoBootstrapResult> future; variable
112 base::Unretained(this), &future));
113 return future.get();
122 void bootstrapVideoAcceleratorFactoryOnMojoThread(Future<MojoBootstrapResult>* future)
    [all...]
  /tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/compress/
ExecutorCompressor.java 29 * and never returns an uncomputed future object.
51 final SettableFuture<CompressionResult> future = SettableFuture.create(); local
54 future.set(immediateCompress(source));
56 future.setException(e);
60 return future;

Completed in 645 milliseconds

1 2 3 4 5 6 7 8 91011>>