/external/guava/guava/src/com/google/common/util/concurrent/ |
ForwardingExecutorService.java | 26 import java.util.concurrent.Future; 54 public <T> List<Future<T>> invokeAll( 60 public <T> List<Future<T>> invokeAll( 104 public <T> Future<T> submit(Callable<T> task) { 109 public Future<?> submit(Runnable task) { 114 public <T> Future<T> submit(Runnable task, T result) {
|
CheckedFuture.java | 23 import java.util.concurrent.Future; 30 * easier to create a future that executes logic which can throw an exception. 35 * {@code Future#get()}: {@link CancellationException}, 40 * listeners to be added. This allows the future to be used as a normal 41 * {@link Future} or as an asynchronous callback mechanism as needed. This 43 * future will guarantee execution of all listeners when the task completes. 45 * <p>For a simpler alternative to CheckedFuture, consider accessing Future 46 * values with {@link Futures#get(Future, Class) Futures.get()}. 56 * Exception checking version of {@link Future#get()} that will translate 60 * @return the result of executing the future [all...] |
AbstractScheduledService.java | 25 import java.util.concurrent.Future; 120 public Future<?> schedule(AbstractService service, ScheduledExecutorService executor, 139 public Future<?> schedule(AbstractService service, ScheduledExecutorService executor, 147 abstract Future<?> schedule(AbstractService service, ScheduledExecutorService executor, 158 private volatile Future<?> runningTask; 329 /** The future that represents the next execution of this task.*/ 331 private Future<Void> currentFuture; 348 * Atomically reschedules this task and assigns the new future to {@link #currentFuture}. 352 // cancel calls cancel on the correct future. 2. we want to make sure that the assignment 364 // because the service does not monitor the state of the future so if the exception is no [all...] |
/external/chromium_org/chrome/common/extensions/docs/server2/ |
object_store.py | 5 from future import Future 12 '''Gets a |Future| with the value of |key| in the object store, or None 16 return Future(callback=lambda: multi_get_future.Get().get(key)) 19 '''Gets a |Future| with values mapped to |keys| from the object store, with
|
test_patcher.py | 5 from future import Future 29 return Future(value=dict((path, self._patch_data[path])
|
appengine_url_fetcher.py | 10 from future import Future 39 """Fetches a file asynchronously, and returns a Future with the result. 45 return Future(callback=lambda: rpc.get_result())
|
cache_chain_object_store.py | 5 from future import Future 43 return Future(value=cached_items) 50 # Don't realise the Future value of an object store that we don't need to; 75 return Future(callback=resolve)
|
chroot_file_system.py | 9 from future import Future 41 return Future(callback=resolve)
|
future.py | 11 '''Creates a Future which returns a list of results from each Future in 24 return Future(callback=resolve) 27 class Future(object):
|
manifest_data_source_test.py | 10 from future import Future 284 return Future(value=manifest_features)
|
persistent_object_store.py | 8 from future import Future 26 [future.wait() for future in futures] 34 return dict((key, future.get_result().GetValue()) 35 for key, future in db_futures.iteritems() 36 if future.get_result() is not None) 37 return Future(callback=resolve) 47 [future.wait() for future in futures [all...] |
redirector.py | 9 from future import Future 69 return Future(callback=lambda: [f.Get() for f in futures])
|
compiled_file_system.py | 10 from future import Future 149 '''Returns a Future containing the recursive directory listing of |path| as 165 # asynchronous Future contract) because there's a greater chance to 171 return Future(exc_info=sys.exc_info()) 174 return Future(value=first_layer_files) 201 return Future(callback=resolve) 214 return Future(exc_info=sys.exc_info()) 218 return Future(value=cache_entry._cache_data) 225 return Future(callback=resolve [all...] |
/external/junit/src/org/junit/experimental/ |
ParallelComputer.java | 8 import java.util.concurrent.Future; 38 private final List<Future<Object>> fResults= new ArrayList<Future<Object>>(); 53 for (Future<Object> each : fResults)
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
ExecutorCompletionServiceTest.java | 18 import java.util.concurrent.Future; 91 Future f = ecs.take(); 99 * Take returns the same future object returned by submit 106 Future f1 = ecs.submit(c); 107 Future f2 = ecs.take(); 126 Future f; 149 Future f = ecs.poll(SHORT_DELAY_MS, MILLISECONDS); 159 * returns and eventually runs Future returned by newTaskFor. 178 Future f1 = ecs.submit(c); 181 Future f2 = ecs.take() [all...] |
AbstractExecutorServiceTest.java | 49 Future<?> future = e.submit(task); local 50 assertNull(future.get()); 51 assertNull(future.get(0, MILLISECONDS)); 53 assertTrue(future.isDone()); 54 assertFalse(future.isCancelled()); 62 Future<String> future = e.submit(new StringTask()); local 63 String result = future.get(); 72 Future<?> future = e.submit(new NoOpRunnable()) local 82 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); local [all...] |
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/ |
ParallelSensorOperation.java | 29 import java.util.concurrent.Future; 95 ArrayList<Future<ISensorOperation>> futures = new ArrayList<Future<ISensorOperation>>(); 97 Future<ISensorOperation> future = executor.submit(new Callable<ISensorOperation>() { local 104 futures.add(future); 117 Future<ISensorOperation> future = futures.get(i); local 119 ISensorOperation operation = getFutureResult(future, executionTimeNs); 130 future.cancel(true /* mayInterruptIfRunning */) [all...] |
/external/robolectric/src/test/java/com/xtremelabs/robolectric/util/ |
RobolectricBackgroundExecutorServiceTest.java | 10 import java.util.concurrent.Future; 47 Future<String> future = executorService.submit(runnable, "foo"); local 50 assertFalse(future.isDone()); 54 assertTrue(future.isDone()); 56 assertEquals("foo", future.get()); 61 Future<String> future = executorService.submit(new Callable<String>() { local 69 assertFalse(future.isDone()); 73 assertTrue(future.isDone()) [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
PanoramaMetadataSupport.java | 21 import com.android.gallery3d.util.Future; 35 private Future<PanoramaMetadata> mGetPanoMetadataTask; 78 public void onFutureDone(Future<PanoramaMetadata> future) { 80 mPanoramaMetadata = future.get();
|
/packages/apps/ContactsCommon/src/com/android/contacts/common/vcard/ |
ProcessorBase.java | 19 import java.util.concurrent.Future; 31 * {@link #get()} and {@link #get(long, TimeUnit)}, which are form {@link Future}, aren't 51 * @see Future#cancel(boolean)
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
MediaSet.java | 20 import com.android.gallery3d.util.Future; 232 * Requests sync on this MediaSet. It returns a Future object that can be used by the caller 234 * defined in this class and can be obtained by Future.get(). 238 * The default implementation here returns a Future stub that does nothing and returns 241 public Future<Integer> requestSync(SyncListener listener) { 246 private static final Future<Integer> FUTURE_STUB = new Future<Integer>() { 269 protected Future<Integer> requestSyncOnMultipleSets(MediaSet[] sets, SyncListener listener) { 273 private class MultiSetSyncFuture implements Future<Integer>, SyncListener { 278 private final Future<Integer> mFutures[] [all...] |
ComboAlbumSet.java | 21 import com.android.gallery3d.util.Future; 93 public Future<Integer> requestSync(SyncListener listener) {
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
AbstractListeningExecutorServiceTest.java | 29 import java.util.concurrent.Future; 61 Future<?> future = e.submit(task); local 62 future.get(); 71 Future<String> future = e.submit(new StringTask()); local 72 String result = future.get(); 81 Future<?> future = e.submit(new NoOpRunnable()); local 82 future.get() 91 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); local [all...] |
/libcore/support/src/test/java/tests/support/ |
Support_Exec.java | 33 import java.util.concurrent.Future; 87 Future<String> errFuture = executorService.submit( 89 Future<String> outFuture = executorService.submit( 127 Future<String> errFuture = 129 Future<String> outFuture =
|
/packages/apps/Gallery2/src/com/android/gallery3d/util/ |
JobLimiter.java | 41 private static class JobWrapper<T> implements Future<T>, Job<T> { 44 private Future<T> mDelegate; 53 public synchronized void setFuture(Future<T> future) { 55 mDelegate = future; 136 public synchronized <T> Future<T> submit(Job<T> job, FutureListener<T> listener) { 137 JobWrapper<T> future = new JobWrapper<T>(Utils.checkNotNull(job), listener); local 138 mJobs.addLast(future); 140 return future; 155 public synchronized void onFutureDone(Future future) [all...] |