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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:23:11+00:00 2026-05-20T03:23:11+00:00

I have some really big application mixture of c# and j#. Sometimes when I

  • 0

I have some really big application mixture of c# and j#.

Sometimes when I close it, there are some threads that are not closed and they are hanging in the task manager and it is impossible to kill them from there.

I have really problem to find all those threads and add them to the closing event .

Is there some way violently kill all threads that were opened by application in the closing event ?…

Thanks.

Is there maybe some Tool that can tell me what threads are opened while i close the application and who openned them ?

  • 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-20T03:23:11+00:00Added an answer on May 20, 2026 at 3:23 am

    This shouldn’t be happening, and if it is, you’re trying to address it the wrong way.

    When your application exits, the .NET Framework will automatically kill any threads whose IsBackground property is set to “True”. Designate each of your worker threads as background threads, and you won’t have this problem anymore. Taking advantage of the BackgroundWorker class and the ThreadPool class, which automatically create background threads, is a much better option.

    Otherwise, you need to clean up your foreground threads explicitly. A properly designed application will do its own bookkeeping and have a deterministic, structured way of ensuring that all its threads have been closed before exiting the Main method. This is what you should be doing anyway if your threads require a graceful termination.

    Killing the process is a very bad idea, as is letting your threads run about willy-nilly in your application.

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

Sidebar

Related Questions

I have some really complicated legacy code I've been working on that crashes when
We have some really old code that calls WebServices using behaviours (webservice.htc), and we
Pretty much what the title says really. We have some code that is .NET
I have decided that I really need to get some flowcharts for reverse engineering
I have a piece of code here that i really could use some help
I have a database table full of some really ugly and messy data. In
This is a really basic question but... I have some code like this var
Some projects have properties have miscellaneous settings such as: AllowPayments, ShowSideBar, SectionTitle. Really things
I'd really like to get into some D3D coding, but I don't have the
So I have an object which has some fields, doesn't really matter what. 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.