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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:19:52+00:00 2026-06-02T19:19:52+00:00

Thread Pool like any ExecutorServices, we defined a newFixedPool of size 3. Now I

  • 0

Thread Pool like any ExecutorServices, we defined a newFixedPool of size 3. Now I have a queue of around 10000 runnable tasks.
For executing the above process I have these doubts –

  1. To execute the above process , is the executor will let only 3 threads from the queus of tasks to run in one shot?

  2. The Pool will be carrying 3 Threads , and those 3 threads will only be responsible for executing all the 10000 tasks. If it is correct , how a single thread is running different runnable tasks as finally those tasks are as well threads itself , and in the mid of the running of any of the job/tasks , you can assign new responsibility to the Pool Thread.

  • 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-02T19:19:53+00:00Added an answer on June 2, 2026 at 7:19 pm
    1. Yes, at most only 3 threads will be in the pool at once if in fact you are using Executors.newFixedThreadPool(3)

    2. The 10,000 tasks are not Threads they are simply Runnables. A Thread has to be started via Thread#start to actually create a system thread. Tasks (instances of Runnable) are placed in a BlockingQueue. Threads from the thread pool will poll the BlockingQueue for a task to run. When they complete the task, they return to the queue to get another. If more tasks are added, then they are inserted into the BlockingQueue according to the rules of the implementation of that queue. For most queues this is First-In-First-Out, but a PriorityQueue actually uses a Comparator or natural ordering to sort tasks as they are inserted.

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

Sidebar

Related Questions

I have a thread pool (executor) which I would like to monitor for excessive
I have an existing java/scala application using a global thread pool. I would like
I have a custom thread pool class, that creates some threads that each wait
I have used Thread Pool for New IO server design . I have used
I am using a networking library which uses a thread pool for delegating tasks
I would like to implement a thread pool in Java, which can dynamically resize
i am using a ThreadPoolExecutor with a thread pool size of one to sequentially
I would like to create a thread pool which will execute the most recently
I have a Tomcat installation where I suspect the thread pool may be decreasing
I'm using Thread::Pool::Simple for multi-threading. I have a couple of questions which are quite

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.