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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:51:59+00:00 2026-06-14T18:51:59+00:00

I am in a wierd situation. In my web-server (tomcat), on web request, I

  • 0

I am in a wierd situation. In my web-server (tomcat), on web request, I basically need to cancel a previous request. I have a reference to the thread that was executing the previous request. So I can directly interrupt that thread and the node will do the rest.

I know you are not suppose to interrupt the thread which you do not own. But is it safe to interrupt tomcat thread in this case? What can be the other way? Maintaining own thread pool is waste of resources and ovehead

  • 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-14T18:52:01+00:00Added an answer on June 14, 2026 at 6:52 pm

    Maintaining your own thread pool is a waste of resource but it’s also a gain in every other respect, like stability of your application server. So you need to decide what is more important: A few thousand bytes of memory and CPU cycles or a stable, reliable application.

    The problem with interrupting another thread is that you usually can’t know for sure where in the code that other thread is. You might want to use locking for this:

    Thread A locks something while it’s safe to interrupt, thread B checks the lock and if it can’t get it, it interrupts A.

    But what happens when A is just about to give up the lock, B checks the lock, A unlocks and starts with cleanup, B sends interrupt?

    So you should really use your own thread pool.

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

Sidebar

Related Questions

I have weird situation in newly installed server, and it seems that Google can't
I have this weird situation that i have encountered for the first time and
I have a weird situation involving the need of a double inner join. I
I have a weird situation where I need to get the Name of the
I have a really weird situation. I need to swap a column value between
I have weird situation that extjs 4 always puts last word of custom error
I have a weird situation. A client of mine has a website having this
I have encountered a weird situation while updating/upgrading some legacy code. I have a
I have encountered a very weird situation in Python. I have a while True:
I have come across a situation (which I think is weird but is possibly

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.