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

  • SEARCH
  • Home
  • 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 6387101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:06:36+00:00 2026-05-25T03:06:36+00:00

If I create a fixed size thread pool with 10 threads in java using

  • 0

If I create a fixed size thread pool with 10 threads in java using Executor framework:

private final ExecutorService pool;
pool = Executors.newFixedThreadPool(10);

and then try to submit more than 10 tasks (say for an example, 12 tasks);

for (int i = 0 ; i < 12 ; i++) {
    pool.execute(new Handler(myRunnable));
}

What will happen to the extra tasks (extra two tasks as per the example of 12 tasks)? Will they be blocked until a thread has finished its work?

  • 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-25T03:06:37+00:00Added an answer on May 25, 2026 at 3:06 am

    Quoting the Javadoc for Executors.newFixedThreadPool(int nThreads) (emphasis mine):

    Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. At any point, at most nThreads threads will be active processing tasks. If additional tasks are submitted when all threads are active, they will wait in the queue until a thread is available. If any thread terminates due to a failure during execution prior to shutdown, a new one will take its place if needed to execute subsequent tasks. The threads in the pool will exist until it is explicitly shutdown.

    The Javadocs for code as mature as the Java Concurrency Framework contain a great wealth of knowledge. Keep them close.

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

Sidebar

Related Questions

I need to create a thread pool of a fixed size and use the
I'm allocating my pthread thread-specific data from a fixed-size global pool that's controlled by
In C# and Java, it's possible to create constant strings using one or more
I want to create a mutli dimensional array without a fixed size. I need
I'm trying to create a div with a fixed size that contains images only.
I would like to create pop-up windows (of a fixed size) like this: in
I want to create a fixed arbitrary size ThreadPool in .NET - I understand
i would like to create a fixed size frame for user photos uploaded. I've
I want to be able to create a fixed size hashmap of say 100
I want to create an image of fixed size e.g. 612 by 612. I

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.