Home
last modified time | relevance | path

Searched refs:future (Results 1 – 25 of 544) sorted by relevance

12345678910>>...22

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DListenableFutureTester.java39 private final ListenableFuture<?> future; field in ListenableFutureTester
42 public ListenableFutureTester(ListenableFuture<?> future) { in ListenableFutureTester() argument
44 this.future = future; in ListenableFutureTester()
49 future.addListener(new Runnable() { in setUp()
56 assertFalse(future.isDone()); in setUp()
57 assertFalse(future.isCancelled()); in setUp()
66 assertTrue(future.isDone()); in testCompletedFuture()
67 assertFalse(future.isCancelled()); in testCompletedFuture()
70 assertTrue(future.isDone()); in testCompletedFuture()
71 assertFalse(future.isCancelled()); in testCompletedFuture()
[all …]
DAbstractFutureTest.java47 AbstractFuture<String> future = new AbstractFuture<String>() { in testException() local
53 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
54 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
67 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
68 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
69 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
70 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
71 assertFalse(future.wasInterrupted); in testCancel_notDoneNoInterrupt()
75 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneInterrupt() local
76 assertTrue(future.cancel(true)); in testCancel_notDoneInterrupt()
[all …]
DSettableFutureTest.java31 private SettableFuture<String> future; field in SettableFutureTest
38 future = SettableFuture.create(); in setUp()
39 tester = new ListenableFutureTester(future); in setUp()
45 future.get(5, TimeUnit.MILLISECONDS); in testDefaultState()
51 assertTrue(future.set("value")); in testSetValue()
56 assertTrue(future.setException(new Exception("failure"))); in testSetFailure()
62 future.setException(null); in testSetFailureNull()
66 assertFalse(future.isDone()); in testSetFailureNull()
67 assertTrue(future.setException(new Exception("failure"))); in testSetFailureNull()
72 assertTrue(future.cancel(true)); in testCancel()
DFuturesTest.java96 ListenableFuture<String> future = Futures.immediateFuture(DATA1); in testImmediateFuture() local
99 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS)); in testImmediateFuture()
113 ListenableFuture<String> future = in testImmediateFailedFuture() local
117 future.get(0L, TimeUnit.MILLISECONDS); in testImmediateFailedFuture()
128 CheckedFuture<String, MyException> future = Futures.immediateCheckedFuture( in testImmediateCheckedFuture() local
132 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS)); in testImmediateCheckedFuture()
133 assertSame(DATA1, future.checkedGet(0L, TimeUnit.MILLISECONDS)); in testImmediateCheckedFuture()
151 CheckedFuture<String, MyException> future = in testImmediateFailedCheckedFuture() local
155 future.get(0L, TimeUnit.MILLISECONDS); in testImmediateFailedCheckedFuture()
163 future.checkedGet(0L, TimeUnit.MILLISECONDS); in testImmediateFailedCheckedFuture()
[all …]
DMoreExecutorsTest.java72 Future<?> future = executor.submit(incrementTask); in testSameThreadExecutorServiceInThreadExecution()
73 assertTrue(future.isDone()); in testSameThreadExecutorServiceInThreadExecution()
83 ListenableFuture<?> future = executor.submit(incrementTask); in testSameThreadExecutorServiceInThreadExecution() local
84 assertTrue(future.isDone()); in testSameThreadExecutorServiceInThreadExecution()
85 assertListenerRunImmediately(future); in testSameThreadExecutorServiceInThreadExecution()
117 Future<Integer> future = futures.get(i); in testSameThreadExecutorInvokeAll() local
118 assertTrue("Task should have been run before being returned", future.isDone()); in testSameThreadExecutorInvokeAll()
119 assertEquals(i, future.get().intValue()); in testSameThreadExecutorInvokeAll()
139 Future<?> future = executor.submit(new Callable<Void>() { in testSameThreadExecutorServiceTermination()
155 assertTrue(future.isDone()); in testSameThreadExecutorServiceTermination()
[all …]
DAbstractListeningExecutorServiceTest.java61 Future<?> future = e.submit(task); in testExecuteRunnable() local
62 future.get(); in testExecuteRunnable()
71 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
72 String result = future.get(); in testSubmitCallable()
81 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
82 future.get(); in testSubmitRunnable()
83 assertTrue(future.isDone()); in testSubmitRunnable()
91 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
92 String result = future.get(); in testSubmitRunnable2()
104 Future future = e.submit(Executors.callable( in testSubmitPrivilegedAction()
[all …]
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
DAbstractCheckedFutureTest.java70 final CheckedFuture<Boolean, ?> future = in testCheckedGetThrowsApplicationExceptionOnCancellation() local
73 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
74 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
79 future.cancel(true); in testCheckedGetThrowsApplicationExceptionOnCancellation()
84 future.checkedGet(); in testCheckedGetThrowsApplicationExceptionOnCancellation()
90 assertTrue(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
91 assertTrue(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
97 final CheckedFuture<Boolean, ?> future = in testCheckedGetThrowsApplicationExceptionOnInterruption() local
103 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
104 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
[all …]
DAbstractListenableFutureTest.java44 protected ListenableFuture<Boolean> future; field in AbstractListenableFutureTest
51 future = createListenableFuture(Boolean.TRUE, null, latch); in setUp()
74 assertFalse(future.isDone()); in testGetBlocksUntilValueAvailable()
75 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
85 assertSame(Boolean.TRUE, future.get()); in testGetBlocksUntilValueAvailable()
102 assertTrue(future.isDone()); in testGetBlocksUntilValueAvailable()
103 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
115 future.get(20, TimeUnit.MILLISECONDS); in testTimeoutOnGetWorksCorrectly()
131 assertFalse(future.isDone()); in testCanceledFutureThrowsCancellation()
132 assertFalse(future.isCancelled()); in testCanceledFutureThrowsCancellation()
[all …]
DMockFutureListener.java39 private final ListenableFuture<?> future; field in MockFutureListener
41 public MockFutureListener(ListenableFuture<?> future) { in MockFutureListener() argument
43 this.future = future; in MockFutureListener()
45 future.addListener(this, MoreExecutors.sameThreadExecutor()); in MockFutureListener()
64 Assert.assertEquals(expectedData, future.get()); in assertSuccess()
80 future.get(); in assertException()
/external/guava/guava/src/com/google/common/util/concurrent/
DFutures.java80 ListenableFuture<V> future, Function<Exception, X> mapper) { in makeChecked() argument
81 return new MappingCheckedFuture<V, X>(checkNotNull(future), mapper); in makeChecked()
91 SettableFuture<V> future = SettableFuture.create(); in immediateFuture() local
92 future.set(value); in immediateFuture()
93 return future; in immediateFuture()
106 SettableFuture<V> future = SettableFuture.create(); in immediateCheckedFuture() local
107 future.set(value); in immediateCheckedFuture()
108 return Futures.makeChecked(future, new Function<Exception, X>() { in immediateCheckedFuture()
130 SettableFuture<V> future = SettableFuture.create();
131 future.setException(throwable);
[all …]
DJdkFutureAdapters.java59 Future<V> future) { in listenInPoolThread() argument
60 if (future instanceof ListenableFuture<?>) { in listenInPoolThread()
61 return (ListenableFuture<V>) future; in listenInPoolThread()
63 return new ListenableFutureAdapter<V>(future); in listenInPoolThread()
68 Future<V> future, Executor executor) { in listenInPoolThread() argument
70 if (future instanceof ListenableFuture<?>) { in listenInPoolThread()
71 return (ListenableFuture<V>) future; in listenInPoolThread()
73 return new ListenableFutureAdapter<V>(future, executor); in listenInPoolThread()
DSimpleTimeLimiter.java126 Future<T> future = executor.submit(callable); in callWithTimeout() local
130 return future.get(timeoutDuration, timeoutUnit); in callWithTimeout()
132 future.cancel(true); in callWithTimeout()
136 return Uninterruptibles.getUninterruptibly(future, in callWithTimeout()
142 future.cancel(true); in callWithTimeout()
DUninterruptibles.java126 public static <V> V getUninterruptibly(Future<V> future) in getUninterruptibly() argument
132 return future.get(); in getUninterruptibly()
154 Future<V> future, long timeout, TimeUnit unit) in getUninterruptibly() argument
164 return future.get(remainingNanos, NANOSECONDS); in getUninterruptibly()
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
DAccountManagerTest.java45 AccountManagerFuture<Bundle> future = in testGetAuthTokenByFeatures_isCancelled() local
48 assertThat(future.isCancelled(), equalTo(false)); in testGetAuthTokenByFeatures_isCancelled()
49 future.cancel(true); in testGetAuthTokenByFeatures_isCancelled()
50 assertThat(future.isCancelled(), equalTo(true)); in testGetAuthTokenByFeatures_isCancelled()
55 AccountManagerFuture<Bundle> future = in testGetAuthTokenByFeatures_isDoneWithCancel() local
58 assertThat(future.isDone(), equalTo(false)); in testGetAuthTokenByFeatures_isDoneWithCancel()
59 future.cancel(true); in testGetAuthTokenByFeatures_isDoneWithCancel()
60 assertThat(future.isDone(), equalTo(true)); in testGetAuthTokenByFeatures_isDoneWithCancel()
65 AccountManagerFuture<Bundle> future = in testGetAuthTokenByFeatures_isDoneWithGetResult() local
68 assertThat(future.isDone(), equalTo(false)); in testGetAuthTokenByFeatures_isDoneWithGetResult()
[all …]
/external/guava/guava-tests/test/com/google/common/testing/
DGcFinalizationTest.java39 final SettableFuture<Void> future = SettableFuture.create(); in testAwaitDone_Future() local
41 protected void finalize() { future.set(null); } in testAwaitDone_Future()
44 GcFinalization.awaitDone(future); in testAwaitDone_Future()
45 assertTrue(future.isDone()); in testAwaitDone_Future()
46 assertFalse(future.isCancelled()); in testAwaitDone_Future()
50 final SettableFuture<Void> future = SettableFuture.create(); in testAwaitDone_Future_Cancel() local
52 protected void finalize() { future.cancel(false); } in testAwaitDone_Future_Cancel()
55 GcFinalization.awaitDone(future); in testAwaitDone_Future_Cancel()
56 assertTrue(future.isDone()); in testAwaitDone_Future_Cancel()
57 assertTrue(future.isCancelled()); in testAwaitDone_Future_Cancel()
[all …]
/external/robolectric/src/test/java/com/xtremelabs/robolectric/util/
DRobolectricBackgroundExecutorServiceTest.java47 Future<String> future = executorService.submit(runnable, "foo"); in submitRunnable_shouldRunStuffOnBackgroundThread() local
50 assertFalse(future.isDone()); in submitRunnable_shouldRunStuffOnBackgroundThread()
54 assertTrue(future.isDone()); in submitRunnable_shouldRunStuffOnBackgroundThread()
56 assertEquals("foo", future.get()); in submitRunnable_shouldRunStuffOnBackgroundThread()
61 Future<String> future = executorService.submit(new Callable<String>() { in submitCallable_shouldRunStuffOnBackgroundThread() local
69 assertFalse(future.isDone()); in submitCallable_shouldRunStuffOnBackgroundThread()
73 assertTrue(future.isDone()); in submitCallable_shouldRunStuffOnBackgroundThread()
75 assertEquals("foo", future.get()); in submitCallable_shouldRunStuffOnBackgroundThread()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowAsyncTask.java22 private final FutureTask<Result> future; field in ShadowAsyncTask
28 future = new FutureTask<Result>(worker) { in ShadowAsyncTask()
57 return future.isCancelled(); in isCancelled()
62 return future.cancel(mayInterruptIfRunning); in cancel()
67 return future.get(); in get()
72 return future.get(timeout, unit); in get()
84 future.run(); in execute()
/external/icu4c/data/locales/
Des_419.txt131 day-future{
135 hour-future{
139 minute-future{
143 month-future{
147 second-future{
151 week-future{
155 year-future{
Dkk.txt259 day-future{
271 hour-future{
283 minute-future{
295 month-future{
307 second-future{
319 week-future{
331 year-future{
Dfr_CA.txt148 day-future{
156 hour-future{
164 minute-future{
172 month-future{
180 second-future{
188 week-future{
196 year-future{
Dsi.txt465 day-future{
474 hour-future{
483 minute-future{
492 month-future{
501 second-future{
510 week-future{
519 year-future{
Dte.txt572 day-future{
584 hour-future{
596 minute-future{
608 month-future{
620 second-future{
632 week-future{
644 year-future{
/external/smack/src/org/jivesoftware/smackx/filetransfer/
DFaultTolerantNegotiator.java94 Future<InputStream> future; in createIncomingStream() local
97 future = service.poll(10, TimeUnit.SECONDS); in createIncomingStream()
103 if (future == null) { in createIncomingStream()
108 stream = future.get(); in createIncomingStream()
119 for (Future<InputStream> future : futures) { in createIncomingStream()
120 future.cancel(true); in createIncomingStream()
/external/guava/guava-testlib/src/com/google/common/testing/
DGcFinalization.java115 public static void awaitDone(Future<?> future) { in awaitDone() argument
116 if (future.isDone()) { in awaitDone()
123 if (future.isDone()) { in awaitDone()
128 future.get(1L, SECONDS); in awaitDone()
/external/clang/test/SemaCXX/
Dlinkage2.cpp59 class future { class
63 template <class _Rp> future<_Rp>
67 … shared_future(future<_Rp&>&& __f); // expected-warning {{rvalue references are a C++11 extension}}

12345678910>>...22