Home
last modified time | relevance | path

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

12345678910>>...33

/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 testDirectExecutorServiceServiceInThreadExecution()
114 assertTrue(future.isDone()); in testDirectExecutorServiceServiceInThreadExecution()
124 ListenableFuture<?> future = executor.submit(incrementTask); in testDirectExecutorServiceServiceInThreadExecution() local
125 assertTrue(future.isDone()); in testDirectExecutorServiceServiceInThreadExecution()
126 assertListenerRunImmediately(future); in testDirectExecutorServiceServiceInThreadExecution()
158 Future<Integer> future = futures.get(i); in testDirectExecutorServiceInvokeAll() local
159 assertTrue("Task should have been run before being returned", future.isDone()); in testDirectExecutorServiceInvokeAll()
160 assertEquals(i, future.get().intValue()); in testDirectExecutorServiceInvokeAll()
180 Future<?> future = executor.submit(new Callable<Void>() { in testDirectExecutorServiceServiceTermination()
196 assertTrue(future.isDone()); in testDirectExecutorServiceServiceTermination()
[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.java40 private final ListenableFuture<?> future; field in MockFutureListener
42 public MockFutureListener(ListenableFuture<?> future) { in MockFutureListener() argument
44 this.future = future; in MockFutureListener()
46 future.addListener(this, directExecutor()); in MockFutureListener()
65 Assert.assertEquals(expectedData, future.get()); in assertSuccess()
81 future.get(); in assertException()
/external/icu/icu4c/source/data/locales/
Dmzn.txt131 future{
142 future{
153 future{
191 future{
202 future{
213 future{
224 future{
235 future{
246 future{
283 future{
[all …]
Dce.txt306 future{
319 future{
332 future{
372 future{
385 future{
398 future{
411 future{
424 future{
437 future{
476 future{
[all …]
Den_GB.txt69 future{
82 future{
94 future{
107 future{
120 future{
131 future{
144 future{
155 future{
167 future{
180 future{
[all …]
/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 …]
/external/dagger2/producers/src/test/java/dagger/producers/internal/
DProducersTest.java40 ListenableFuture<String> future = Futures.immediateFuture("monkey"); in createFutureProduced_success() local
41 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_success()
47 ListenableFuture<String> future = Futures.immediateFailedFuture(new RuntimeException("monkey")); in createFutureProduced_failure() local
48 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_failure()
54 ListenableFuture<String> future = SettableFuture.create(); in createFutureProduced_cancelPropagatesBackwards() local
55 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_cancelPropagatesBackwards()
58 assertThat(future.isCancelled()).isTrue(); in createFutureProduced_cancelPropagatesBackwards()
62 ListenableFuture<String> future = SettableFuture.create(); in createFutureProduced_cancelDoesNotPropagateForwards() local
63 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_cancelDoesNotPropagateForwards()
65 future.cancel(false); in createFutureProduced_cancelDoesNotPropagateForwards()
[all …]
/external/robolectric/v1/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/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/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/test/std/thread/futures/futures.async/
Dasync.pass.cpp70 std::future<int> f = std::async(f0); in main()
78 std::future<int> f = std::async(std::launch::async, f0); in main()
86 std::future<int> f = std::async(std::launch::any, f0); in main()
94 std::future<int> f = std::async(std::launch::deferred, f0); in main()
103 std::future<int&> f = std::async(f1); in main()
111 std::future<int&> f = std::async(std::launch::async, f1); in main()
119 std::future<int&> f = std::async(std::launch::any, f1); in main()
127 std::future<int&> f = std::async(std::launch::deferred, f1); in main()
136 std::future<void> f = std::async(f2); in main()
144 std::future<void> f = std::async(std::launch::async, f2); in main()
[all …]
/external/robolectric/v1/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/libgdx/gdx/src/com/badlogic/gdx/utils/async/
DAsyncResult.java27 private final Future<T> future; field in AsyncResult
29 AsyncResult (Future<T> future) { in AsyncResult() argument
30 this.future = future; in AsyncResult()
35 return future.isDone(); in isDone()
42 return future.get(); in get()
/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()

12345678910>>...33