Home
last modified time | relevance | path

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

12345678910>>...25

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DAsyncSettableFutureTest.java38 AsyncSettableFuture<Integer> future = AsyncSettableFuture.create(); in testCreate() local
39 assertFalse(future.isSet()); in testCreate()
40 assertFalse(future.isDone()); in testCreate()
41 assertFalse(future.isCancelled()); in testCreate()
45 AsyncSettableFuture<Integer> future = AsyncSettableFuture.create(); in testSetValue() local
46 assertTrue(future.setValue(42)); in testSetValue()
47 assertTrue(future.isSet()); in testSetValue()
49 assertFalse(future.setValue(23)); in testSetValue()
50 assertFalse(future.setException(new Exception("bar"))); in testSetValue()
51 assertFalse(future.setFuture(SettableFuture.<Integer>create())); in testSetValue()
[all …]
DAbstractFutureTest.java48 AbstractFuture<String> future = new AbstractFuture<String>() { in testException() local
54 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
55 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
68 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
69 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
70 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
71 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
72 assertFalse(future.wasInterrupted()); in testCancel_notDoneNoInterrupt()
73 assertFalse(future.interruptTaskWasCalled); in testCancel_notDoneNoInterrupt()
75 future.get(); in testCancel_notDoneNoInterrupt()
[all …]
DListenableFutureTester.java42 private final ListenableFuture<?> future; field in ListenableFutureTester
45 public ListenableFutureTester(ListenableFuture<?> future) { in ListenableFutureTester() argument
47 this.future = checkNotNull(future); in ListenableFutureTester()
52 future.addListener(new Runnable() { in setUp()
59 assertFalse(future.isDone()); in setUp()
60 assertFalse(future.isCancelled()); in setUp()
69 assertTrue(future.isDone()); in testCompletedFuture()
70 assertFalse(future.isCancelled()); in testCompletedFuture()
73 assertTrue(future.isDone()); in testCompletedFuture()
74 assertFalse(future.isCancelled()); in testCompletedFuture()
[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()
DMoreExecutorsTest.java113 Future<?> future = executor.submit(incrementTask); in testSameThreadExecutorServiceInThreadExecution()
114 assertTrue(future.isDone()); in testSameThreadExecutorServiceInThreadExecution()
124 ListenableFuture<?> future = executor.submit(incrementTask); in testSameThreadExecutorServiceInThreadExecution() local
125 assertTrue(future.isDone()); in testSameThreadExecutorServiceInThreadExecution()
126 assertListenerRunImmediately(future); in testSameThreadExecutorServiceInThreadExecution()
158 Future<Integer> future = futures.get(i); in testSameThreadExecutorInvokeAll() local
159 assertTrue("Task should have been run before being returned", future.isDone()); in testSameThreadExecutorInvokeAll()
160 assertEquals(i, future.get().intValue()); in testSameThreadExecutorInvokeAll()
180 Future<?> future = executor.submit(new Callable<Void>() { in testSameThreadExecutorServiceTermination()
196 assertTrue(future.isDone()); in testSameThreadExecutorServiceTermination()
[all …]
DFuturesTest.java108 ListenableFuture<String> future = Futures.immediateFuture(DATA1); in testImmediateFuture() local
111 assertSame(DATA1, future.get(0L, TimeUnit.MILLISECONDS)); in testImmediateFuture()
125 ListenableFuture<String> future = in testImmediateFailedFuture() local
129 future.get(0L, TimeUnit.MILLISECONDS); in testImmediateFailedFuture()
139 ListenableFuture<String> future = in testImmediateFailedFuture_cancellationException() local
143 future.get(0L, TimeUnit.MILLISECONDS); in testImmediateFailedFuture_cancellationException()
148 assertFalse(future.isCancelled()); in testImmediateFailedFuture_cancellationException()
153 ListenableFuture<String> future = in testImmediateCancelledFuture() local
155 assertTrue(future.isCancelled()); in testImmediateCancelledFuture()
161 CheckedFuture<String, MyException> future = Futures.immediateCheckedFuture( in testImmediateCheckedFuture() local
[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/libcxx/test/std/thread/futures/futures.unique_future/
Dcopy_ctor.fail.cpp24 std::future<T> f0 = p.get_future(); in main()
25 std::future<T> f = f0; in main()
31 std::future<T> f0; in main()
32 std::future<T> f = f0; in main()
39 std::future<T> f0 = p.get_future(); in main()
40 std::future<T> f = f0; in main()
46 std::future<T> f0; in main()
47 std::future<T> f = std::move(f0); in main()
54 std::future<T> f0 = p.get_future(); in main()
55 std::future<T> f = f0; in main()
[all …]
Dcopy_assign.fail.cpp25 std::future<T> f0 = p.get_future(); in main()
26 std::future<T> f; in main()
33 std::future<T> f0; in main()
34 std::future<T> f; in main()
42 std::future<T> f0 = p.get_future(); in main()
43 std::future<T> f; in main()
50 std::future<T> f0; in main()
51 std::future<T> f; in main()
59 std::future<T> f0 = p.get_future(); in main()
60 std::future<T> f; in main()
[all …]
Dmove_ctor.pass.cpp27 std::future<T> f0 = p.get_future(); in main()
28 std::future<T> f = std::move(f0); in main()
34 std::future<T> f0; in main()
35 std::future<T> f = std::move(f0); in main()
42 std::future<T> f0 = p.get_future(); in main()
43 std::future<T> f = std::move(f0); in main()
49 std::future<T> f0; in main()
50 std::future<T> f = std::move(f0); in main()
57 std::future<T> f0 = p.get_future(); in main()
58 std::future<T> f = std::move(f0); in main()
[all …]
Dmove_assign.pass.cpp27 std::future<T> f0 = p.get_future(); in main()
28 std::future<T> f; in main()
35 std::future<T> f0; in main()
36 std::future<T> f; in main()
44 std::future<T> f0 = p.get_future(); in main()
45 std::future<T> f; in main()
52 std::future<T> f0; in main()
53 std::future<T> f; in main()
61 std::future<T> f0 = p.get_future(); in main()
62 std::future<T> f; in main()
[all …]
Dshare.pass.cpp26 std::future<T> f0 = p.get_future(); in main()
33 std::future<T> f0; in main()
41 std::future<T> f0 = p.get_future(); in main()
48 std::future<T> f0; in main()
56 std::future<T> f0 = p.get_future(); in main()
63 std::future<T> f0; in main()
/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-testlib/test/com/google/common/testing/
DGcFinalizationTest.java53 final SettableFuture<Void> future = SettableFuture.create(); in testAwaitDone_Future() local
55 @Override protected void finalize() { future.set(null); } in testAwaitDone_Future()
58 GcFinalization.awaitDone(future); in testAwaitDone_Future()
59 assertTrue(future.isDone()); in testAwaitDone_Future()
60 assertFalse(future.isCancelled()); in testAwaitDone_Future()
64 final SettableFuture<Void> future = SettableFuture.create(); in testAwaitDone_Future_Cancel() local
66 @Override protected void finalize() { future.cancel(false); } in testAwaitDone_Future_Cancel()
69 GcFinalization.awaitDone(future); in testAwaitDone_Future_Cancel()
70 assertTrue(future.isDone()); in testAwaitDone_Future_Cancel()
71 assertTrue(future.isCancelled()); in testAwaitDone_Future_Cancel()
[all …]
/external/libcxx/test/std/thread/futures/futures.promise/
Dalloc_ctor.pass.cpp31 std::future<int> f = p.get_future(); in main()
39 std::future<int&> f = p.get_future(); in main()
47 std::future<void> f = p.get_future(); in main()
55 std::future<int> f = p.get_future(); in main()
60 std::future<int&> f = p.get_future(); in main()
65 std::future<void> f = p.get_future(); in main()
71 std::future<int> f = p.get_future(); in main()
76 std::future<int&> f = p.get_future(); in main()
81 std::future<void> f = p.get_future(); in main()
/external/libcxx/include/
Dfuture2 //===--------------------------- future -----------------------------------===//
15 future synopsis
75 future<R> get_future();
105 future<R&> get_future();
133 future<void> get_future();
150 class future
153 future() noexcept;
154 future(future&&) noexcept;
155 future(const future& rhs) = delete;
156 ~future();
[all …]
/external/libcxx/test/std/thread/futures/futures.async/
Dasync.pass.cpp69 std::future<int> f = std::async(f0); in main()
77 std::future<int> f = std::async(std::launch::async, f0); in main()
85 std::future<int> f = std::async(std::launch::any, f0); in main()
93 std::future<int> f = std::async(std::launch::deferred, f0); in main()
102 std::future<int&> f = std::async(f1); in main()
110 std::future<int&> f = std::async(std::launch::async, f1); in main()
118 std::future<int&> f = std::async(std::launch::any, f1); in main()
126 std::future<int&> f = std::async(std::launch::deferred, f1); in main()
135 std::future<void> f = std::async(f2); in main()
143 std::future<void> f = std::async(std::launch::async, f2); in main()
[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/guava/guava-testlib/test/com/google/common/util/concurrent/testing/
DTestingExecutorsTest.java48 ScheduledFuture<?> future = TestingExecutors.noOpScheduledExecutor().schedule( in testNoOpScheduledExecutor() local
52 assertFalse(future.isDone()); in testNoOpScheduledExecutor()
75 Future<Boolean> future = futureList.get(0); in testNoOpScheduledExecutorInvokeAll() local
77 assertTrue(future.isDone()); in testNoOpScheduledExecutorInvokeAll()
79 future.get(); in testNoOpScheduledExecutorInvokeAll()
94 Future<Integer> future = TestingExecutors.sameThreadScheduledExecutor().schedule( in testSameThreadScheduledExecutor() local
97 assertEquals(6, (int) future.get()); in testSameThreadScheduledExecutor()
107 Future<?> future = TestingExecutors.sameThreadScheduledExecutor().submit(runnable); in testSameThreadScheduledExecutorWithException() local
109 future.get(); in testSameThreadScheduledExecutorWithException()
/external/guava/guava/src/com/google/common/util/concurrent/
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()
91 Future<V> future, Executor executor) { in listenInPoolThread() argument
93 if (future instanceof ListenableFuture) { in listenInPoolThread()
94 return (ListenableFuture<V>) future; in listenInPoolThread()
96 return new ListenableFutureAdapter<V>(future, executor); in listenInPoolThread()
/external/icu/icu4c/source/data/locales/
Dky.txt663 future{
676 future{
689 future{
729 future{
742 future{
755 future{
768 future{
781 future{
794 future{
833 future{
[all …]
Des_MX.txt276 future{
288 future{
314 future{
326 future{
334 future{
346 future{
362 future{
370 future{
382 future{
390 future{
[all …]
/external/libcxx/test/std/thread/futures/futures.shared_future/
Dctor_future.pass.cpp26 std::future<T> f0 = p.get_future(); in main()
33 std::future<T> f0; in main()
41 std::future<T> f0 = p.get_future(); in main()
48 std::future<T> f0; in main()
56 std::future<T> f0 = p.get_future(); in main()
63 std::future<T> f0; in main()

12345678910>>...25