Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
For resource monitoring i need to know how much resources are being consumed. Is there a good way to know which parent a thread belongs to. from there I can log usage per thread...

What I have tried:

I can pass the parent id in a thread start, but there are so many other way to start a thread for are already in use in this mature project... really just need to know it at logging time.
Posted
Updated 3-Apr-17 23:32pm

There is no such thing as a parent-child relationship between threads in .NET. You have to setup a structure and tracking mechanism to do this yourself. Some method of launching threads and placing the data in the structure and removing it when threads terminate.

I fail to see why you would ever need to do this.
 
Share this answer
 
Why do you not use the visual studio performance window? I can't think of any reason of 'monitoring' this in a none-debug version.

Beginners Guide to Performance Profiling[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900