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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:48:21+00:00 2026-06-03T16:48:21+00:00

I must say that it’s probably a bad pattern, but in my sandbox I

  • 0

I must say that it’s probably a bad pattern, but in my sandbox I created an interface that call a background service (that fires a thread and keep it live) every time I click a button.

This is good, cause I can create a chaos situation and found out how the environment will deal with this.

But, otherwise, I’m facing a problem: How can I get all thread currently running and kill them all. Calling GB or something.

  • 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-03T16:48:23+00:00Added an answer on June 3, 2026 at 4:48 pm

    I assume that you don’t want a list of all running threads- you want a list of running threads that you started via some particular mechanism, right?

    If that’s the case, you can do something like this where you start those threads:

    List<Thread> myThreads = new List<Thread>();
    
    public void StartAThread() {
        Thread t = new Thread( ... whatever ...);
        myThreads.Add(t);
        t.Start();
    }
    

    Now, assuming that you want to kill those threads with extreme prejudice– that is, you want them dead, now, and you don’t care about knock-on effects of leaving work half-done, you can do:

    foreach (var t in myThreads)
        t.Abort();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I must say that so far, I've probably just been darn lucky in that
First of all, I must say that I'm very new to Google Closure, but
First I must say that I'm not good at English and completely new to
Firstly, I must say that the version of Lucene.NET we are using is not
Why does MISRA 14.5 say that the continue statement must not be used?
Well, I must say , I am lost with a feeling that the operation
Suppose I have a method that must return an object (say from a database
Say I want to define that an URI such as: myapp://path/to/what/i/want?d=This%20is%20a%20test must be handled
My slides say that: A recursive call should always be on a smaller data
First, I must say that I have read several post about this at StackOverflow

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.