Home
last modified time | relevance | path

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

12345678910>>...104

/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.java70 AbstractFuture<String> future = in testException() local
77 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
78 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
91 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
92 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
93 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
94 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
95 assertFalse(future.wasInterrupted()); in testCancel_notDoneNoInterrupt()
96 assertFalse(future.interruptTaskWasCalled); in testCancel_notDoneNoInterrupt()
98 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/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.java70 AbstractFuture<String> future = in testException() local
77 ExecutionException ee1 = getExpectingExecutionException(future); in testException()
78 ExecutionException ee2 = getExpectingExecutionException(future); in testException()
91 InterruptibleFuture future = new InterruptibleFuture(); in testCancel_notDoneNoInterrupt() local
92 assertTrue(future.cancel(false)); in testCancel_notDoneNoInterrupt()
93 assertTrue(future.isCancelled()); in testCancel_notDoneNoInterrupt()
94 assertTrue(future.isDone()); in testCancel_notDoneNoInterrupt()
95 assertFalse(future.wasInterrupted()); in testCancel_notDoneNoInterrupt()
96 assertFalse(future.interruptTaskWasCalled); in testCancel_notDoneNoInterrupt()
98 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.kt24 val future = GlobalScope.future { in <lambda>() constant
29 assertEquals("OK", future.get()) in <lambda>()
34 val future = SettableFuture.create<Int>() in <lambda>() constant
37 future.await() in <lambda>()
41 future.set(1) in <lambda>()
47 val future = SettableFuture.create<Int>() in <lambda>() constant
50 future.await() in <lambda>()
63 val future = GlobalScope.future { in <lambda>() constant
66 assertEquals("OK", future.get()) in <lambda>()
72 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 assertEquals("OK", future.get()) in <lambda>()
40 val future = GlobalScope.future { in <lambda>() constant
43 assertEquals("OK", future.get()) in <lambda>()
51 val future = GlobalScope.future { in <lambda>() constant
54 assertEquals("OK", future.get()) in <lambda>()
60 val future = GlobalScope.future { in <lambda>() constant
63 assertFalse(future.isDone) in <lambda>()
65 assertEquals("OK", future.get()) 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/icu/icu4c/source/data/locales/
Dff_Adlm.txt475 future{
493 future{
511 future{
555 future{
572 future{
589 future{
605 future{
618 future{
631 future{
647 future{
[all …]
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/rust/crates/futures-task/src/
Dspawn.rs15 fn spawn_obj(&self, future: FutureObj<'static, ()>) -> Result<(), SpawnError>; in spawn_obj()
40 fn spawn_local_obj(&self, future: LocalFutureObj<'static, ()>) -> Result<(), SpawnError>; in spawn_local_obj()
87 fn spawn_obj(&self, future: FutureObj<'static, ()>) -> Result<(), SpawnError> { in spawn_obj()
88 Sp::spawn_obj(self, future) in spawn_obj()
97 fn spawn_obj(&self, future: FutureObj<'static, ()>) -> Result<(), SpawnError> { in spawn_obj()
98 Sp::spawn_obj(self, future) in spawn_obj()
107 fn spawn_local_obj(&self, future: LocalFutureObj<'static, ()>) -> Result<(), SpawnError> { in spawn_local_obj()
108 Sp::spawn_local_obj(self, future) in spawn_local_obj()
117 fn spawn_local_obj(&self, future: LocalFutureObj<'static, ()>) -> Result<(), SpawnError> { in spawn_local_obj()
118 Sp::spawn_local_obj(self, future) in spawn_local_obj()
[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 …]
/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 …]
/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/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/rust/crates/futures/tests/
Deager_drop.rs3 use futures::future::{self, FutureExt, TryFutureExt}; in map_ok()
4 use futures_test::future::FutureTestExt; in map_ok()
12 future::ready::<Result<i32, i32>>(Err(1)) in map_ok()
25 use futures::future::{self, FutureExt, TryFutureExt}; in map_err()
26 use futures_test::future::FutureTestExt; in map_err()
34 future::ready::<Result<i32, i32>>(Ok(1)) in map_err()
46 use futures::future::Future;
55 future: F, field
62 self.project().future.poll(cx) in poll()
69 use futures::future::{self, FutureExt, TryFutureExt}; in then_drops_eagerly()
[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/rust/crates/criterion/src/
Dasync_executor.rs14 use std::future::Future;
22 fn block_on<T>(&self, future: impl Future<Output = T>) -> T; in block_on()
30 fn block_on<T>(&self, future: impl Future<Output = T>) -> T { in block_on()
31 futures::executor::block_on(future) in block_on()
40 fn block_on<T>(&self, future: impl Future<Output = T>) -> T { in block_on()
41 smol::block_on(future) in block_on()
47 fn block_on<T>(&self, future: impl Future<Output = T>) -> T { in block_on()
48 self.block_on(future) in block_on()
53 fn block_on<T>(&self, future: impl Future<Output = T>) -> T { in block_on()
54 (*self).block_on(future) in block_on()
[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 …]

12345678910>>...104