Home
last modified time | relevance | path

Searched refs:Future (Results 1 – 25 of 90) sorted by relevance

1234

/frameworks/native/include/ftl/
Dfuture.h34 class Future final : public details::BaseFuture<Future<T, FutureImpl>, T, FutureImpl> {
35 using Base = details::BaseFuture<Future, T, FutureImpl>;
38 friend details::BaseFuture<Future<T>, T, std::future>; // For BaseFuture<...>::share.
42 Future() : future_(std::in_place_type<FutureImpl<T>>) {} in Future() function
45 Future(FutureImpl<T>&& f) : future_(std::move(f)) {} in Future() function
71 auto then(F&& op) && -> Future<details::future_result_t<R>> {
86 friend Future<V> yield(V&&);
89 friend Future<V> yield(Args&&...);
92 Future(details::ValueTag, Args&&... args) in Future() function
99 using SharedFuture = Future<T, std::shared_future>;
[all …]
/frameworks/native/libs/ftl/
Dfuture_test.cpp29 TEST(Future, Example) { in TEST() argument
45 ftl::Future<char> futures[] = {ftl::yield('a'), ftl::yield('b')}; in TEST()
47 ftl::Future<char> chain = ftl::Future(std::move(future)) in TEST()
66 TEST(Future, Chain) { in TEST() argument
74 std::packaged_task<ftl::Future<ByteVector>(ByteVector)> decrement_bytes( in TEST()
84 ftl::Future(std::move(fetch)) in TEST()
96 .then([](ftl::Future<ByteVector> bytes) { return bytes; }) in TEST()
105 TEST(Future, WaitFor) { in TEST() argument
126 auto get_future = ftl::Future(get_int.get_future()); in TEST()
/frameworks/native/libs/binder/rust/src/
Dbinder_async.rs17 use std::future::Future;
22 pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
51 Fut: Future<Output = Result<B, E>>, in spawn()
63 fn block_on<F: Future>(&self, future: F) -> F::Output; in block_on()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/remote/
DRemoteCallTest.java45 import java.util.concurrent.Future;
134 Future<RemoteResult> result = runInWorkerThreadAsync(remoteCall::call); in testCall_whenTimesOutBeforeCallbackIsCalled_returnsTimeOut()
151 Future<RemoteResult> result = runInWorkerThreadAsync(remoteCall::call); in testCall_whenTimesOutBeforeCancelIsCalled_returnsTimeOut()
171 Future<RemoteResult> result = runInWorkerThreadAsync(remoteCall::call); in testCall_whenCallbackIsCalledBeforeTimeOut_returnsResult()
183 Future<RemoteResult> result = runInWorkerThreadAsync(remoteCall::call); in testCall_whenCallbackIsCalledBeforeCancel_returnsResult()
199 Future<RemoteResult> result = runInWorkerThreadAsync(remoteCall::call); in testCall_whenCancelIsCalledBeforeCallbackButAfterCall_returnsCancel()
213 Future<RemoteResult> result = runInWorkerThreadAsync(remoteCall::call); in testCall_whenCancelIsCalledBeforeTimeOutButAfterCall_returnsCancel()
234 Future<RemoteResult> result = in testExecute_whenTimesOutBeforeCallback_returnsTimeOut()
252 private static <T> Future<T> runInWorkerThreadAsync(Callable<T> supplier) { in runInWorkerThreadAsync()
/frameworks/base/media/tests/mediatestutils/java/com/android/media/mediatestutils/
DCancelAllFuturesRule.java25 import java.util.concurrent.Future;
31 private List<Future> mRegisteredFutures = new ArrayList<>();
33 public <T extends Future<?>> T registerFuture(T future) { in registerFuture()
/frameworks/base/rs/java/android/renderscript/
DScriptGroup.java109 private Future mReturnFuture;
110 private Map<Script.FieldID, Future> mGlobalFuture;
127 mGlobalFuture = new HashMap<Script.FieldID, Future>(); in Closure()
167 mGlobalFuture = new HashMap<Script.FieldID, Future>(); in Closure()
218 if (obj instanceof Future) { in retrieveValueAndDependenceInfo()
219 Future f = (Future)obj; in retrieveValueAndDependenceInfo()
251 public Future getReturn() { in getReturn()
253 mReturnFuture = new Future(this, null, mReturnValue); in getReturn()
266 public Future getGlobal(Script.FieldID field) { in getGlobal()
267 Future f = mGlobalFuture.get(field); in getGlobal()
[all …]
/frameworks/rs/support/java/src/androidx/renderscript/
DScriptGroup.java118 private Future mReturnFuture;
119 private Map<Script.FieldID, Future> mGlobalFuture;
140 mGlobalFuture = new HashMap<Script.FieldID, Future>(); in Closure()
183 mGlobalFuture = new HashMap<Script.FieldID, Future>(); in Closure()
215 if (obj instanceof Future) { in retrieveValueAndDependenceInfo()
216 Future f = (Future)obj; in retrieveValueAndDependenceInfo()
248 public Future getReturn() { in getReturn()
250 mReturnFuture = new Future(this, null, mReturnValue); in getReturn()
263 public Future getGlobal(Script.FieldID field) { in getGlobal()
264 Future f = mGlobalFuture.get(field); in getGlobal()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DMockScheduledExecutorService.java29 import java.util.concurrent.Future;
134 public <T> Future<T> submit(Callable<T> task) { in submit()
145 public <T> Future<T> submit(Runnable task, T result) { in submit()
150 public Future<?> submit(Runnable runnable) { in submit()
159 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
165 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, in invokeAll()
/frameworks/base/services/tests/servicestests/src/com/android/server/apphibernation/
DHibernationStateDiskStoreTest.java44 import java.util.concurrent.Future;
191 public <T> Future<T> submit(Callable<T> task) { in submit()
196 public <T> Future<T> submit(Runnable task, T result) { in submit()
201 public Future<?> submit(Runnable task) { in submit()
206 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
212 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, in invokeAll()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DTestExecutorService.java32 import java.util.concurrent.Future;
41 private class CompletedFuture<T> implements Future<T>, ScheduledFuture<T> {
146 public <T> Future<T> submit(Callable<T> task) { in submit()
151 public <T> Future<T> submit(Runnable task, T result) { in submit()
156 public Future<?> submit(Runnable task) { in submit()
162 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) { in invokeAll()
167 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, in invokeAll()
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DMockBatteryStatsImpl.java46 import java.util.concurrent.Future;
291 public Future<?> scheduleSync(String reason, int flags) { in scheduleSync()
296 public Future<?> scheduleCleanupDueToRemovedUser(int userId) { in scheduleCleanupDueToRemovedUser()
301 public Future<?> scheduleCpuSyncDueToRemovedUid(int uid) { in scheduleCpuSyncDueToRemovedUid()
306 public Future<?> scheduleSyncDueToScreenStateChange(int flag, boolean onBattery, in scheduleSyncDueToScreenStateChange()
313 public Future<?> scheduleCpuSyncDueToWakelockChange(long delayMillis) { in scheduleCpuSyncDueToWakelockChange()
322 public Future<?> scheduleSyncDueToBatteryLevelChange(long delayMillis) { in scheduleSyncDueToBatteryLevelChange()
/frameworks/native/libs/binder/rust/binder_tokio/
Dlib.rs33 use std::future::Future;
118 Fut: Future<Output = Result<B, E>>, in spawn()
160 fn block_on<F: Future>(&self, future: F) -> F::Output { in block_on()
166 fn block_on<F: Future>(&self, future: F) -> F::Output { in block_on()
172 fn block_on<F: Future>(&self, future: F) -> F::Output { in block_on()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DUiOffloadThread.java23 import java.util.concurrent.Future;
40 public Future<?> execute(Runnable runnable) { in execute()
/frameworks/base/services/core/java/com/android/server/am/
DStackTracesDumpHelper.java53 import java.util.concurrent.Future;
93 Future<ArrayList<Integer>> nativePidsFuture, StringWriter logExceptionCreatingFile, in dumpStackTraces()
106 Future<ArrayList<Integer>> nativePidsFuture, StringWriter logExceptionCreatingFile, in dumpStackTraces()
120 Future<ArrayList<Integer>> nativePidsFuture, StringWriter logExceptionCreatingFile, in dumpStackTraces()
123 Future<File> firstPidFilePromise, AnrLatencyTracker latencyTracker) { in dumpStackTraces()
136 Future<ArrayList<Integer>> extraPidsFuture = null; in dumpStackTraces()
192 ArrayList<Integer> firstPids, Future<ArrayList<Integer>> nativePidsFuture, in dumpStackTraces()
193 Future<ArrayList<Integer>> extraPidsFuture, Future<File> firstPidFilePromise, in dumpStackTraces()
411 private static boolean copyFirstPidTempDump(String tracesFile, Future<File> firstPidFilePromise, in copyFirstPidTempDump()
599 private static ArrayList<Integer> collectPids(Future<ArrayList<Integer>> pidsFuture, in collectPids()
DAnrHelper.java39 import java.util.concurrent.Future;
164 Future<File> firstPidDumpPromise = mEarlyDumpExecutor.submit(() -> { in appNotResponding()
286 final Future<File> mFirstPidFilePromise;
291 Future<File> firstPidFilePromise) { in AnrRecord()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/
DTestUiOffloadThread.java23 import java.util.concurrent.Future;
36 public Future<?> execute(Runnable runnable) { in execute()
/frameworks/base/services/core/java/com/android/server/power/stats/
DBatteryExternalStatsWorker.java54 import java.util.concurrent.Future;
108 private Future<?> mCurrentFuture = null;
129 private Future<?> mWakelockChangesUpdate;
132 private Future<?> mBatteryLevelSync;
135 private Future<?> mProcessStateSync;
252 public synchronized Future<?> scheduleSync(String reason, int flags) { in scheduleSync()
257 public synchronized Future<?> scheduleCpuSyncDueToRemovedUid(int uid) { in scheduleCpuSyncDueToRemovedUid()
262 public Future<?> scheduleSyncDueToScreenStateChange(int flags, boolean onBattery, in scheduleSyncDueToScreenStateChange()
278 public Future<?> scheduleCpuSyncDueToWakelockChange(long delayMillis) { in scheduleCpuSyncDueToWakelockChange()
301 public Future<?> scheduleSyncDueToBatteryLevelChange(long delayMillis) { in scheduleSyncDueToBatteryLevelChange()
[all …]
/frameworks/libs/systemui/viewcapturelib/src/com/android/app/viewcapture/
DLooperExecutor.java23 import java.util.concurrent.Future;
52 public <T> Future<T> submit(Callable<T> task) { in submit()
/frameworks/base/services/core/java/com/android/server/
DContextHubSystemService.java28 import java.util.concurrent.Future;
34 private Future<?> mInit;
DSystemServerInitThreadPool.java37 import java.util.concurrent.Future;
80 public static @NonNull Future<?> submit(@NonNull Runnable runnable, in submit()
94 private @NonNull Future<?> submitTask(@NonNull Runnable runnable, in submitTask()
/frameworks/native/include/ftl/details/
Dfuture.h22 class Future; variable
42 struct future_result<Future<T, FutureImpl>> {
59 Future<T, std::shared_future> share() {
/frameworks/base/services/companion/java/com/android/server/companion/transport/
DTransport.java46 import java.util.concurrent.Future;
154 public Future<byte[]> sendMessage(int message, byte[] data) { in sendMessage()
180 public Future<byte[]> requestForResponse(int message, byte[] data) { in requestForResponse()
200 private Future<byte[]> sendAndForget(int message, byte[]data) { in sendAndForget()
/frameworks/base/core/java/com/android/internal/util/
DConcurrentUtils.java27 import java.util.concurrent.Future;
84 public static <T> T waitForFutureNoInterrupt(Future<T> future, String description) {
/frameworks/base/media/tests/mediatestutils/javatests/com/android/media/mediatestutils/
DCancelAllFuturesRuleTest.java33 import java.util.concurrent.Future;
72 Future getFuture(int idx) {
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DAnrHelperTest.java55 import java.util.concurrent.Future;
71 private Future<File> mEarlyDumpFuture;
100 mEarlyDumpFuture = mock(Future.class); in setUp()

1234