473,809 Members | 2,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I monitor the status of a thread

JnrJnr
88 New Member
Hi people Im new to threading and I'm trying to monitor or destinguish when my thread has started and stopped running.
Is there a good way to do this?
Please help
Oct 19 '11 #1
1 1533
JnrJnr
88 New Member
Expand|Select|Wrap|Line Numbers
  1. private delegate void checkStatus(string status);
  2. private void TheThread()
  3. {
  4.    begininvoke(new checkStatus(statusMeth), "Started");
  5.    //statements
  6.    begininvoke(new checkStatus(statusMeth), "finished");
  7. }
  8. private void statusMeth(string status)
  9. {
  10.    console.writeline(status);
  11. }
Oct 19 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6528
by: Hamed Seifoddini | last post by:
Hi. This might be answered before, but I couldn't find it. How can you make the main thread to wait() This does NOT work : Thread.currentThread().wait(); Regards,
44
2380
by: Charles Law | last post by:
Hi guys. I'm back on the threading gig again. It's the age-old question about waiting for something to happen without wasting time doing it. Take two threads: the main thread and a worker thread. The worker thread is reading the serial port, waiting for something to happen (a service request). When it does it raises an event. Of course, the event is executed on the worker thread. The idea is that when the event is raised, the handler...
3
10473
by: Kranthis | last post by:
Hi, I want to restart a thread after same variable value in the thread reaches 100 in c# . How can I do. Please suggest me any solution
3
22181
by: bygandhi | last post by:
Hi - I am writing a service which will check a process and its threads for their state ( alive or dead ). The process has 5 .net managed threads created using thread.start and each have been assigned a name. As in .net there is no way we can get the managed threads, I am thinking of making a win32 call and check their status.
3
1019
by: Elizabeth Harmon | last post by:
hi All, I dont know if this is possible, so i am asking Is there a Way to monitor a connection when it is fetching on a web page? I am providing a status Bar and process to my users so they can see something is happening? I would like to do a while loop as in
7
13468
by: Dave | last post by:
Is there a way to query the monitor status, to know if it is on or off in C#? I found that WM_SYSCOMMAND is sent to WndProc when the monitor goes on and off but im not sure to find out if that message is always just about the monitor. Thanks for any help.
11
6064
by: Michael Moreno | last post by:
Hello, I have a C# server which has 4 worker threads running all the time. When I let the server runs for several hours, for some reasons the CPU usage of the application will shoot to 100% and remain there. I would like to find out which thread(s) is/are the source of the problem. Would you have any idea on how to tackle the problem please?
3
1966
by: sekarm | last post by:
Dear guys, In C# windows application i am using four threads for seperate process. Each thread done seperate job.i want to monitor the thread process in main windows form.so each thread update data in windows controls in mainForm.By using this i got the exception "Cross thread operation not valid", so i am using Invoke method for access controls in mainform.by using this i am write if loop for invoke the control using...
7
1550
by: Brent | last post by:
Page1.aspx calls Page2.aspx like this: ---------------- Server.Execute("Page2.aspx"); --------------- Page2.aspx's Page_Load event calls a function, getMsgs().This function runs normally when it is called directly, as in ---------------
6
2907
by: alag20 | last post by:
Hi Guys, I am working on a new project to provide some kind of monitor on a webpage. Basically i have a c# application which does task A, B....X, Y, Z. Now we would like to view what task it is doing / state in a web page and maybe trigger something in the application to stop all it is doing and do task T and then continue etc. Can someone guide me in the right direction? Thanks in advance.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10383
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7661
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.