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

12

/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);
/external/libcxx/src/
H A Dfuture.cpp1 //===------------------------- 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<voi
[all...]
/external/glide/library/src/main/java/com/bumptech/glide/volley/
H A DVolleyStreamFetcher.java78 private final VolleyRequestFuture<InputStream> future; field in class:VolleyStreamFetcher.GlideRequest
81 public GlideRequest(String url, VolleyRequestFuture<InputStream> future, Priority priority) { argument
82 super(Method.GET, url, future);
83 this.future = future;
99 future.onResponse(new ByteArrayInputStream(response));
/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/glide/library/src/main/java/com/bumptech/glide/load/engine/
H A DResourceRunner.java36 private volatile Future<?> future; field in class:ResourceRunner
63 if (future != null) {
64 future.cancel(false);
70 future = diskCacheService.submit(this);
92 future = resizeService.submit(sourceRunner);
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
H A DShadowAsyncTask.java22 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();
/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/kernel-headers/original/uapi/linux/
H A Dcramfs_fs.h58 __u32 future; /* reserved for future use */ member in struct:cramfs_super
80 * changed to test super.future instead.
/external/chromium_org/chrome/browser/safe_browsing/
H A Dprotocol_manager_unittest.cc222 Time future = now + TimeDelta::FromMinutes(1); local
223 EXPECT_TRUE(pm->next_gethash_time_ >= future - margin &&
224 pm->next_gethash_time_ <= future + margin);
636 // to run that in the future.
H A Dsafe_browsing_store_unittest.cc296 const base::Time future = now + base::TimeDelta::FromDays(3*365); local
299 EXPECT_GT(static_cast<int32>(future.ToTimeT()), 0)
/external/chromium_org/remoting/android/java/src/org/chromium/chromoting/
H A DChromoting.java319 public void run(AccountManagerFuture<Bundle> future) { argument
327 result = future.getResult();
/external/chromium_org/sync/android/java/src/org/chromium/sync/signin/
H A DAccountManagerHelper.java164 AccountManagerFuture<Bundle> future = mAccountManager.getAuthToken(account,
167 return getAuthTokenInner(future, errorEncountered);
217 private String getAuthTokenInner(AccountManagerFuture<Bundle> future, argument
220 Bundle result = future.getResult();
251 AccountManagerFuture<Bundle> future;
253 future = mAccountManager.getAuthToken(
256 future = mAccountManager.getAuthToken(
259 final AccountManagerFuture<Bundle> finalFuture = future;
/external/chromium_org/third_party/mesa/src/src/gallium/drivers/nouveau/
H A Dnouveau_video.h39 unsigned past, future, current; member in struct:nouveau_decoder
/external/clang/test/SemaCXX/
H A Dlinkage2.cpp61 class future { class in namespace:test6
65 template <class _Rp> future<_Rp>
69 shared_future(future<_Rp&>&& __f);
/external/mesa3d/src/gallium/drivers/nouveau/
H A Dnouveau_video.h39 unsigned past, future, current; member in struct:nouveau_decoder
/external/chromium_org/base/message_loop/
H A Dmessage_pump_glib_unittest.cc108 Time future = last_time + TimeDelta::FromMilliseconds(delay_ms); local
109 EventInjector::Event event = {future, callback, task};

Completed in 600 milliseconds

12