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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:09:35+00:00 2026-06-08T00:09:35+00:00

My understanding of thread pool is that that when you pass a thread pool

  • 0

My understanding of thread pool is that that when you pass a thread pool a method it picks a thread from its active pool and sends the method off to be executed. My understanding of a thread is that if you put some code in it, it will run through the code without stopping until it is told to sleep or stop.

My question:

When you pass several methods (of roughly equal length to execute) to a thread pool one after another does the thread pool manage sharing between the different threads being executed so that the tasks finish almost simultaneously or does it execute them one after another – for example, task 1 goes into thread 1, thread 1 starts executing it and thread 2 with task 2 in it hasn’t had a chance to run until task task 1 has finished because thread 1 was running through the code it has been given without any explicit messages to sleep – so then thread 2 will execute and the tasks will essentially finish one after another.

Basically, do I have to explicitly make sure the code I give to a thread pool has a breaks in it for the threads to run simultaneously? Or do I get this for free when using a thread pool manager?

  • 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-08T00:09:37+00:00Added an answer on June 8, 2026 at 12:09 am

    1. The number of Thread you specify in the pool works simultaneously, thats what threads are for, to simultaneously do the work. Its a Parallel Run

    2. For example FixedThreadPool, will have certain nos of threads, when you give them a certain nos of tasks to be performed, all runs simultaneously to do it, if the number of work is less than the threads in the pool, then only those many thread which are needed to perform the task will run simultaneously.

    3. In case of CachedThreadPool, the number of threads in the pool run simultaneously to complete the work, if there is a need of more thread, CachedThreadPool will create new ones or till then it reuses it.

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

Sidebar

Related Questions

My understanding is that if I start up another thread to perform some actions,
My understanding is that threads in theory are executed in parallel. JVM decides; when
It's my understanding that if two threads are reading from the same piece of
I would appreciate your help in understanding a "Concurrency Example" from: http://forums.sun.com/thread.jspa?threadID=735386 public synchronized
My understanding is that Thread.Abort should raise a ThreadAbortException on a blocked thread, however
I want to create a background thread on the iPhone that executes some code
It's my understanding that GHC gives each thread a stack. Why is this necessary?
The term thread divergence is used in CUDA; from my understanding it's a situation
Understanding Magento Models by reference of SQL: select * from user_devices where user_id =
Understanding that I should probably just dig into the source to come up with

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.