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 8215351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:45:26+00:00 2026-06-07T11:45:26+00:00

The following code is from AbstractExecutorService : /** * Returns a <tt>RunnableFuture</tt> for the

  • 0

The following code is from AbstractExecutorService:

 /**
 * Returns a <tt>RunnableFuture</tt> for the given callable task.
 *
 * @param callable the callable task being wrapped
 * @return a <tt>RunnableFuture</tt> which when run will call the
 * underlying callable and which, as a <tt>Future</tt>, will yield
 * the callable's result as its result and provide for
 * cancellation of the underlying task.
 * @since 1.6
 */
 protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) {
    return new FutureTask<T>(callable);
 }

I fail to see why the class of the returned object from newTaskFor() would be called RunnableFuture instead of CallableFuture? What am I missing here ?

  • 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-06-07T11:45:28+00:00Added an answer on June 7, 2026 at 11:45 am

    RunnableFuture represents a specific concept : a future result whose computation can be explicitly performed by a worker thread by calling run().

    Since worker threads are usually not interested in the results of the computations they perform, they use run() that doesn’t return the results. And threads that are interested in these results can obtain them from get() as soon as the worker thread finished the computation.

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

Sidebar

Related Questions

Given the following code from RssToolkit in RssXmlHelper.cs: /// <summary> /// Returns XML of
I run the following code from command line: public class MemoryTest { public static
I have the following code from a legacy app which currently reads from an
Following example code from the libpcap documentation yields the following code which should report
Given the following code from a Microsoft example: public class EngineMeasurementCollection : Collection<EngineMeasurement> {
I’ve got the following code (from a partial view), which creates a list of
If I run the following code from a terminal, I get a helpful error
I have the following code (from a previous question on this site) which retrieves
I'm getting data from my textarea with the following code $about_me=mysql_real_escape_string(nl2br($_POST['about_me'])); which 1. Receives
I've found the following code from here http://www.boyet.com/Articles/CodeFromInternet.html . It returns the speed of

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.