Home
last modified time | relevance | path

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

12345678910>>...70

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DAbstractAbstractFutureTest.java44 private TestedFuture<Integer> future; field in AbstractAbstractFutureTest
51 future = TestedFuture.create(); in setUp()
56 assertPending(future); in testPending()
60 assertThat(future.set(1)).isTrue(); in testSuccessful()
61 assertSuccessful(future, 1); in testSuccessful()
66 assertThat(future.setException(cause)).isTrue(); in testFailed()
67 assertFailed(future, cause); in testFailed()
71 assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue(); in testCanceled()
72 assertCancelled(future, false); in testCanceled()
76 assertThat(future.cancel(true /* mayInterruptIfRunning */)).isTrue(); in testInterrupted()
[all …]
DSettableFutureTest.java34 private SettableFuture<String> future; field in SettableFutureTest
41 future = SettableFuture.create(); in setUp()
42 tester = new ListenableFutureTester(future); in setUp()
48 future.get(5, TimeUnit.MILLISECONDS); in testDefaultState()
55 assertTrue(future.set("value")); in testSetValue()
60 assertTrue(future.setException(new Exception("failure"))); in testSetFailure()
66 future.setException(null); in testSetFailureNull()
70 assertFalse(future.isDone()); in testSetFailureNull()
71 assertTrue(future.setException(new Exception("failure"))); in testSetFailureNull()
76 assertTrue(future.cancel(true)); in testCancel()
[all …]
DAbstractFutureTest.java68 AbstractFuture<String> future = in testException() local
75 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
76 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
89 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
90 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
91 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
92 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
93 assertFalse(future.wasInterrupted()); in testCancel_notDoneNoInterrupt()
94 assertFalse(future.interruptTaskWasCalled); in testCancel_notDoneNoInterrupt()
96 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( in setUp()
62 assertFalse(future.isDone()); in setUp()
63 assertFalse(future.isCancelled()); in setUp()
72 assertTrue(future.isDone()); in testCompletedFuture()
73 assertFalse(future.isCancelled()); in testCompletedFuture()
76 assertTrue(future.isDone()); in testCompletedFuture()
77 assertFalse(future.isCancelled()); in testCompletedFuture()
[all …]
DAbstractFutureCancellationCauseTest.java86 Future<?> future = newFutureInstance(); in testCancel_notDoneNoInterrupt() local
87 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
88 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
89 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
90 assertNull(tryInternalFastPathGetFailure(future)); in testCancel_notDoneNoInterrupt()
92 future.get(); in testCancel_notDoneNoInterrupt()
100 Future<?> future = newFutureInstance(); in testCancel_notDoneInterrupt() local
101 assertTrue(future.cancel(true)); in testCancel_notDoneInterrupt()
102 assertTrue(future.isCancelled()); in testCancel_notDoneInterrupt()
103 assertTrue(future.isDone()); in testCancel_notDoneInterrupt()
[all …]
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DAbstractAbstractFutureTest.java44 private TestedFuture<Integer> future; field in AbstractAbstractFutureTest
51 future = TestedFuture.create(); in setUp()
56 assertPending(future); in testPending()
60 assertThat(future.set(1)).isTrue(); in testSuccessful()
61 assertSuccessful(future, 1); in testSuccessful()
66 assertThat(future.setException(cause)).isTrue(); in testFailed()
67 assertFailed(future, cause); in testFailed()
71 assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue(); in testCanceled()
72 assertCancelled(future, false); in testCanceled()
76 assertThat(future.cancel(true /* mayInterruptIfRunning */)).isTrue(); in testInterrupted()
[all …]
DSettableFutureTest.java34 private SettableFuture<String> future; field in SettableFutureTest
41 future = SettableFuture.create(); in setUp()
42 tester = new ListenableFutureTester(future); in setUp()
48 future.get(5, TimeUnit.MILLISECONDS); in testDefaultState()
55 assertTrue(future.set("value")); in testSetValue()
60 assertTrue(future.setException(new Exception("failure"))); in testSetFailure()
66 future.setException(null); in testSetFailureNull()
70 assertFalse(future.isDone()); in testSetFailureNull()
71 assertTrue(future.setException(new Exception("failure"))); in testSetFailureNull()
76 assertTrue(future.cancel(true)); in testCancel()
[all …]
DAbstractFutureTest.java68 AbstractFuture<String> future = in testException() local
75 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
76 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
89 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
90 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
91 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
92 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
93 assertFalse(future.wasInterrupted()); in testCancel_notDoneNoInterrupt()
94 assertFalse(future.interruptTaskWasCalled); in testCancel_notDoneNoInterrupt()
96 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( in setUp()
62 assertFalse(future.isDone()); in setUp()
63 assertFalse(future.isCancelled()); in setUp()
72 assertTrue(future.isDone()); in testCompletedFuture()
73 assertFalse(future.isCancelled()); in testCompletedFuture()
76 assertTrue(future.isDone()); in testCompletedFuture()
77 assertFalse(future.isCancelled()); in testCompletedFuture()
[all …]
DAbstractFutureCancellationCauseTest.java86 Future<?> future = newFutureInstance(); in testCancel_notDoneNoInterrupt() local
87 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
88 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
89 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
90 assertNull(tryInternalFastPathGetFailure(future)); in testCancel_notDoneNoInterrupt()
92 future.get(); in testCancel_notDoneNoInterrupt()
100 Future<?> future = newFutureInstance(); in testCancel_notDoneInterrupt() local
101 assertTrue(future.cancel(true)); in testCancel_notDoneInterrupt()
102 assertTrue(future.isCancelled()); in testCancel_notDoneInterrupt()
103 assertTrue(future.isDone()); in testCancel_notDoneInterrupt()
[all …]
/external/kotlinx.coroutines/integration/kotlinx-coroutines-guava/test/
DListenableFutureTest.kt25 val future = GlobalScope.future { in <lambda>() constant
30 assertThat(future.get(), IsEqual("OK")) in <lambda>()
35 val future = SettableFuture.create<Int>() in <lambda>() constant
38 future.await() in <lambda>()
42 future.set(1) in <lambda>()
48 val future = SettableFuture.create<Int>() in <lambda>() constant
51 future.await() in <lambda>()
64 val future = GlobalScope.future { in <lambda>() constant
67 assertThat(future.get(), IsEqual("OK")) in <lambda>()
73 val future = GlobalScope.future { in <lambda>() constant
[all …]
/external/kotlinx.coroutines/integration/kotlinx-coroutines-jdk8/test/future/
DFutureTest.kt5 package kotlinx.coroutines.future in <lambda>()
28 val future = GlobalScope.future { in <lambda>() constant
33 assertThat(future.get(), IsEqual("OK")) in <lambda>()
40 val future = GlobalScope.future { in <lambda>() constant
43 assertThat(future.get(), IsEqual("OK")) in <lambda>()
51 val future = GlobalScope.future { in <lambda>() constant
54 assertThat(future.get(), IsEqual("OK")) in <lambda>()
60 val future = GlobalScope.future { in <lambda>() constant
63 assertFalse(future.isDone) in <lambda>()
65 assertThat(future.get(), IsEqual("OK")) in <lambda>()
[all …]
DAsFutureTest.kt5 package kotlinx.coroutines.future
23 val future = deferred.asCompletableFuture() in <lambda>() constant
24 assertEquals("OK", future.await()) in <lambda>()
31 val future = job.asCompletableFuture() in <lambda>() constant
32 assertEquals(Unit, future.await()) in <lambda>()
43 val future = deferred.asCompletableFuture() in <lambda>() constant
44 assertEquals("OK", future.await()) // await yields main thread to deferred coroutine in <lambda>()
51 val future = job.asCompletableFuture() in testWaitForJobAsCompletableFuture() constant
55 assertEquals(Unit, future.await()) in testWaitForJobAsCompletableFuture()
61 val future = deferred.asCompletableFuture() in testAsCompletableFutureThrowable() constant
[all …]
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/
DAbstractListenableFutureTest.java44 protected ListenableFuture<Boolean> future; field in AbstractListenableFutureTest
51 future = createListenableFuture(Boolean.TRUE, null, latch); in setUp()
68 assertFalse(future.isDone()); in testGetBlocksUntilValueAvailable()
69 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
80 assertSame(Boolean.TRUE, future.get()); in testGetBlocksUntilValueAvailable()
99 assertTrue(future.isDone()); in testGetBlocksUntilValueAvailable()
100 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
108 future.get(20, TimeUnit.MILLISECONDS); in testTimeoutOnGetWorksCorrectly()
123 assertFalse(future.isDone()); in testCanceledFutureThrowsCancellation()
124 assertFalse(future.isCancelled()); in testCanceledFutureThrowsCancellation()
[all …]
DAbstractCheckedFutureTest.java62 final CheckedFuture<Boolean, ?> future = createCheckedFuture(Boolean.TRUE, null, latch); in testCheckedGetThrowsApplicationExceptionOnCancellation() local
64 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
65 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
71 future.cancel(true); in testCheckedGetThrowsApplicationExceptionOnCancellation()
77 future.checkedGet(); in testCheckedGetThrowsApplicationExceptionOnCancellation()
83 assertTrue(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
84 assertTrue(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
89 final CheckedFuture<Boolean, ?> future = createCheckedFuture(Boolean.TRUE, null, latch); in testCheckedGetThrowsApplicationExceptionOnInterruption() local
94 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
95 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
[all …]
/external/guava/android/guava-testlib/src/com/google/common/util/concurrent/testing/
DAbstractListenableFutureTest.java44 protected ListenableFuture<Boolean> future; field in AbstractListenableFutureTest
51 future = createListenableFuture(Boolean.TRUE, null, latch); in setUp()
68 assertFalse(future.isDone()); in testGetBlocksUntilValueAvailable()
69 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
80 assertSame(Boolean.TRUE, future.get()); in testGetBlocksUntilValueAvailable()
99 assertTrue(future.isDone()); in testGetBlocksUntilValueAvailable()
100 assertFalse(future.isCancelled()); in testGetBlocksUntilValueAvailable()
108 future.get(20, TimeUnit.MILLISECONDS); in testTimeoutOnGetWorksCorrectly()
123 assertFalse(future.isDone()); in testCanceledFutureThrowsCancellation()
124 assertFalse(future.isCancelled()); in testCanceledFutureThrowsCancellation()
[all …]
DAbstractCheckedFutureTest.java62 final CheckedFuture<Boolean, ?> future = createCheckedFuture(Boolean.TRUE, null, latch); in testCheckedGetThrowsApplicationExceptionOnCancellation() local
64 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
65 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
71 future.cancel(true); in testCheckedGetThrowsApplicationExceptionOnCancellation()
77 future.checkedGet(); in testCheckedGetThrowsApplicationExceptionOnCancellation()
83 assertTrue(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
84 assertTrue(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnCancellation()
89 final CheckedFuture<Boolean, ?> future = createCheckedFuture(Boolean.TRUE, null, latch); in testCheckedGetThrowsApplicationExceptionOnInterruption() local
94 assertFalse(future.isDone()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
95 assertFalse(future.isCancelled()); in testCheckedGetThrowsApplicationExceptionOnInterruption()
[all …]
/external/kotlinx.coroutines/integration/kotlinx-coroutines-jdk8/src/future/
DFuture.kt5 package kotlinx.coroutines.future in <lambda>()
34 public fun <T> CoroutineScope.future( in <lambda>() method
41 val future = CompletableFuture<T>() in <lambda>() constant
42 val coroutine = CompletableFutureCoroutine(newContext, future) in <lambda>()
43 future.whenComplete(coroutine) // Cancel coroutine if future was completed externally in <lambda>()
45 return future in <lambda>()
50 private val future: CompletableFuture<T> constant
57 future.complete(value) in onCompleted()
61 if (!future.completeExceptionally(cause) && !handled) { in onCancelled()
73 val future = CompletableFuture<T>() in asCompletableFuture() constant
[all …]
/external/icu/icu4c/source/data/locales/
Dce.txt444 future{
457 future{
470 future{
502 future{
544 future{
557 future{
570 future{
586 future{
599 future{
612 future{
[all …]
Dmzn.txt129 future{
140 future{
151 future{
189 future{
200 future{
211 future{
222 future{
233 future{
244 future{
281 future{
[all …]
/external/libcxx/test/std/thread/futures/futures.unique_future/
Dcopy_ctor.fail.cpp26 std::future<int> f0; in main()
27 … std::future<int> f = f0; // expected-error {{call to deleted constructor of 'std::future<int>'}} in main()
30 std::future<int &> f0; in main()
31 …std::future<int &> f = f0; // expected-error {{call to deleted constructor of 'std::future<int &>'… in main()
34 std::future<void> f0; in main()
35 … std::future<void> f = f0; // expected-error {{call to deleted constructor of 'std::future<void>'}} in main()
39 std::future<int> f0; in main()
40 …std::future<int> f = f0; // expected-error {{calling a private constructor of class 'std::__1::fut… in main()
43 std::future<int &> f0; in main()
44 …std::future<int &> f = f0; // expected-error {{calling a private constructor of class 'std::__1::f… in main()
[all …]
/external/dagger2/java/dagger/producers/internal/
DDependencyMethodProducer.java56 final ListenableFuture<T> future = callDependencyMethod(); in get() local
57 if (!future.isDone() && futures.add(future)) { in get()
58 future.addListener( in get()
63 futures.remove(future); in get()
69 return future; in get()
77 for (ListenableFuture<T> future : futures) { in cancel()
80 future.cancel(mayInterruptIfRunning); in cancel()
99 final ListenableFuture<T> future = DependencyMethodProducer.this.get(); in newEntryPointView() local
100 if (!future.isDone() && entryPointFutures.add(future)) { in newEntryPointView()
101 future.addListener( in newEntryPointView()
[all …]
/external/dagger2/javatests/dagger/producers/internal/
DProducersTest.java42 ListenableFuture<String> future = Futures.immediateFuture("monkey"); in createFutureProduced_success() local
43 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_success()
49 ListenableFuture<String> future = Futures.immediateFailedFuture(new RuntimeException("monkey")); in createFutureProduced_failure() local
50 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_failure()
59 ListenableFuture<String> future = SettableFuture.create(); in createFutureProduced_cancelPropagatesBackwards() local
60 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_cancelPropagatesBackwards()
63 assertThat(future.isCancelled()).isTrue(); in createFutureProduced_cancelPropagatesBackwards()
67 ListenableFuture<String> future = SettableFuture.create(); in createFutureProduced_cancelDoesNotPropagateForwards() local
68 ListenableFuture<Produced<String>> producedFuture = Producers.createFutureProduced(future); in createFutureProduced_cancelDoesNotPropagateForwards()
70 future.cancel(false); in createFutureProduced_cancelDoesNotPropagateForwards()
[all …]
/external/dagger2/javatests/dagger/functional/producers/cancellation/
DProducerTester.java69 TestFuture future = futures.get(node); in isCancelled() local
70 return future != null && future.isCancelled(); in isCancelled()
95 for (TestFuture future : futures.values()) { in assertNoStartedNodes()
96 assertWithMessage("%s is started", future).that(future.isStarted()).isFalse(); in assertNoStartedNodes()
103 TestFuture future = getOrCreate(node); in assertAboutNodes() local
104 assertWithMessage("%s is %s", future, assertion).that(assertion.test(future)).isTrue(); in assertAboutNodes()
105 builder.add(future); in assertAboutNodes()
129 for (TestFuture future : futures.values()) { in only()
130 if (!expected.contains(future)) { in only()
131 assertWithMessage("%s is %s", future, assertion).that(assertion.test(future)).isFalse(); in only()
[all …]
/external/guava/guava/src/com/google/common/util/concurrent/
DAbstractFuture.java314 final ListenableFuture<? extends V> future; field in AbstractFuture.SetFuture
316 SetFuture(AbstractFuture<V> owner, ListenableFuture<? extends V> future) { in SetFuture() argument
318 this.future = future; in SetFuture()
327 Object valueToSet = getFutureValue(future); in run()
615 ListenableFuture<?> futureToPropagateTo = ((SetFuture) localValue).future; in cancel()
782 protected boolean setFuture(ListenableFuture<? extends V> future) { in setFuture() argument
783 checkNotNull(future); in setFuture()
786 if (future.isDone()) { in setFuture()
787 Object value = getFutureValue(future); in setFuture()
794 SetFuture valueToSet = new SetFuture<V>(this, future); in setFuture()
[all …]

12345678910>>...70