Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 639051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:47:57+00:00 2026-05-13T20:47:57+00:00

In the docs , a FutureWrapper is defined like this: FutureWrapper is a simple

  • 0

In the docs, a FutureWrapper is defined like this:

FutureWrapper is a simple Future that
wraps a parent Future.

What’s a Future, why would you need to wrap it and when would you use it in App Engine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:47:58+00:00Added an answer on May 13, 2026 at 8:47 pm

    It’s the java.util.concurrent.Future<V>. The linked Javadoc is pretty clear and contains an example. For the lazy, here’s a copypaste:

    A Future represents the result of an
    asynchronous computation. Methods are
    provided to check if the computation
    is complete, to wait for its
    completion, and to retrieve the result
    of the computation. The result can
    only be retrieved using method get
    when the computation has completed,
    blocking if necessary until it is
    ready. Cancellation is performed by
    the cancel method. Additional methods
    are provided to determine if the task
    completed normally or was cancelled.
    Once a computation has completed, the
    computation cannot be cancelled. If
    you would like to use a Future for the
    sake of cancellability but not provide
    a usable result, you can declare types
    of the form Future<?> and return null
    as a result of the underlying task.

    Sample Usage (Note that the following
    classes are all made-up.)

     interface ArchiveSearcher { String search(String target); }
     class App {
       ExecutorService executor = ...
       ArchiveSearcher searcher = ...
       void showSearch(final String target)
           throws InterruptedException {
         Future<String> future
           = executor.submit(new Callable<String>() {
             public String call() {
                 return searcher.search(target);
             }});
         displayOtherThings(); // do other things while searching
         try {
           displayText(future.get()); // use future
         } catch (ExecutionException ex) { cleanup(); return; }
       }
     }
    

    The FutureTask class is an
    implementation of Future that
    implements Runnable, and so may be
    executed by an Executor. For example,
    the above construction with submit
    could be replaced by:

     FutureTask<String> future =
       new FutureTask<String>(new Callable<String>() {
         public String call() {
           return searcher.search(target);
       }});
     executor.execute(future);  
    

    Memory consistency effects: Actions
    taken by the asynchronous computation
    happen-before actions following the
    corresponding Future.get() in another
    thread.

    The FutureWrapper is just a decorator for any parent Future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

MSDN docs say that only value types need boxing, but this does not apply
http://docs.djangoproject.com/en/dev/howto/static-files/ This suggests that I can use STATIC_URL in my template to get the
Form docs: Comparable c=mock(Comparable.class); when(c.compareTo(anyInt())).thenReturn(-1); I would like: File tempDir=new File(test); Comparable c=mock(Comparable.class); when(c.compareTo(anyInt())).thenReturn(tempDir.mkdir());
MySQL docs say that tables that use the MERGE storage engine can only union
From docs I understand that .proxy() would change the scope of the function passed
The docs say all I need to do is add this: [extensions] progress =
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Timer.html The reason for this question is that I have a timer running at
Symfony Docs say that we can use birthday date in forms. but they have
The docs (and a number of libraries I've looked at) seem to indicate that
The docs on this are pretty shoddy. There are a number of events you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.