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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:04:55+00:00 2026-06-13T09:04:55+00:00

Hello I am using threadPool with two threads in a funciton. This funciton is

  • 0

Hello I am using threadPool with two threads in a funciton.

This funciton is called by multiple clients in a synchronized way.

in that function I am using

ExecutorService executor = Executors.newFixedThreadPool(2);

and after finishing the task I am shutting down the executor.

executor.shutdown();

But in logs I have lines like this

[pool-120069-thread-1]

Does that mean 120069 pools are alive, or its just way of numbering the pool. Even after shutting it down it continue with the numbering ?

  • 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-13T09:04:57+00:00Added an answer on June 13, 2026 at 9:04 am

    Does that mean 120069 pools are alive, or its just way of numbering the pool.

    Don’t worry, it’s the latter. Every new pool created in the system gets a new sequence number, which means you have created 120069 pools, but probably most of the previous 120068 pools are already shut down.

    On the other hand it’s not a good practice to create a thread pool per each method invocation, consider having just one pool and reuse it across several concurrent method calls. Also you probably don’t need synchronization. But that depends on your actual use case.

    Finally, you probably want to call awaitTermination() after shutdown. shutdown() only “closes the door” to the pool, but running tasks continue to run.

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

Sidebar

Related Questions

hello i am using this Page.ClientScript.RegisterStartupScript() to call a javascript function from vb code
Hello Im using HTTParty to call for a remote json file that I need
Hello i'm using map() jquery to create a new object array DEMO but this
Hello i am using SocializeActionBar for my app there i have multiple links. I
Hello I'm using this star rating widget http://www.fyneworks.com/jquery/star-rating/ to add functionality for users to
hello i'm using this example http://lexandera.com/2009/01/extracting-html-from-a-webview/ to get the HTML from a webview. But
Hello I'm using this sample in Java to try to load OpenStreetMaps Offline tiles,
Hello I am using Code::Blocks in Windows XP. When I am running this program
Hello i am using this tutorial to set the spinwheel for my webview ,
Using a System.Threading.Timer results in threads being spun from a ThreadPool , which means

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.