473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to find the threads running in background

Hi..
Can anyone tell how to find the threads(name or ID) running in the
background using C#. I want to find those threads and to terminate if
needed.

Thanks,
Palani.
Nov 17 '05 #1
4 13014
Hi,

If those are threads created elsewhere, are you sure you want to terminate
them?
Otherwise, keep references to threads you create in your application and
terminate those in any way you see fit.

Please feel free to follow up with a more detailed explanation of your
problem, because I have a feeling you might need more advice on this, but I
cannot provide one without knowing the specifics.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Senthil" <in***********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi..
Can anyone tell how to find the threads(name or ID) running in the
background using C#. I want to find those threads and to terminate if
needed.

Thanks,
Palani.


Nov 17 '05 #2
"Senthil" <in***********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Can anyone tell how to find the threads(name or ID) running in the
background using C#. I want to find those threads and to terminate if
needed.


The Process class has a property called Threads. Enumerate at will.

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton
Nov 17 '05 #3
Hi,

Do they include the thread from the pool ? The doc is not clear in that.

OP: if you want to shutdown the process you do not need to terminate the
backgrounds thread.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Tim Haughton" <ti*********@gmail.com> wrote in message
news:6M*******************@fe04.news.easynews.com. ..
"Senthil" <in***********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Can anyone tell how to find the threads(name or ID) running in the
background using C#. I want to find those threads and to terminate if
needed.


The Process class has a property called Threads. Enumerate at will.

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton

Nov 17 '05 #4
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uN**************@tk2msftngp13.phx.gbl...
Hi,

Do they include the thread from the pool ? The doc is not clear in that.


Hi Ignacio, excellent question. It does indeed include the thread pool.

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lad | last post by:
I would like to use httplib/urllib to download webpages from 3 different websites.From my script I want to open 3 webbrowser windows( 3 threads) and open in each thread( window) pages from a...
0
by: Don Garrett | last post by:
I've been developing with external multi-threaded libraries recently. I find it difficult to use the Python prompt to experiment with these libraries because there isn't any way to just shutdown...
1
by: Manoj | last post by:
Hi, I want to know if it is possible to find out through a vb.net application which other applications are running in the background.For example as soon as i load my form I want it to check if a...
2
by: Lord Merlin | last post by:
Hi there Can someone please tell me how to run a script in the background? I have a stored procedure, which gathers a lot of info on various tables in a MSSQL , and from that rebulds a large...
1
by: andreas.baus | last post by:
Hi. I'm trying to figure out how to properly start and stop threads from a windows form. One thing I still have a problem with is how to make sure the spawned thread(s) are shut down when the...
4
by: MSDousti | last post by:
Hi I have written a VB .NET app, which uses several threads. I thought that when the user closes the main window (when MainForm.closed event occures, and I call application.exit) all running...
0
by: Mamatha | last post by:
Hi I have application in VB.NET,In that application threads are created dynamically and displays URLs of a webpage in the listview.At the time of running each thread their URL values are stored...
1
by: DR | last post by:
what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored...
0
by: Nilam2477 | last post by:
while dubugging C# windows application i want to view the list of threads that are running. How can i view it in the output window
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.