473,394 Members | 1,696 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,394 software developers and data experts.

StackTrace constructor on other threads

There is a StackTrace constructor that can take a target thread. This
requires that the target thread be Suspended. However, the Suspend() method
of Thread is now deprecated. Is there an alternative?

--
Adam Clauss

Aug 15 '06 #1
2 1753
Adam,

I would think that by association, this constructor is depreciated. If
you need stack trace information from a thread, you should have a thread
offer that up.

Either that, or create a custom runtime host which you can use to
monitor the stacks.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Adam Clauss" <ca*****@tamu.eduwrote in message
news:12*************@corp.supernews.com...
There is a StackTrace constructor that can take a target thread. This
requires that the target thread be Suspended. However, the Suspend()
method of Thread is now deprecated. Is there an alternative?

--
Adam Clauss

Aug 15 '06 #2
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:OP**************@TK2MSFTNGP05.phx.gbl...
Adam,

I would think that by association, this constructor is depreciated. If
you need stack trace information from a thread, you should have a thread
offer that up.

Either that, or create a custom runtime host which you can use to
monitor the stacks.
It's amazing how the most innocent comments actually set a light bulb off
hehe. Option 2... is way too complicated for what I am doing.

However, I definately have a method for getting the call stack to be
generated by the threads themselves. Thanks for the help!

--
Adam Clauss
Aug 15 '06 #3

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

Similar topics

4
by: Barry Mossman | last post by:
Hi, I am throwing an exception derived from ApplicationException as follows catch (Exception ex) { throw new MyException("message", ex); } My exception's constructor is: public...
3
by: Kurt Biesemans | last post by:
Hello, I have a line code : StackTrace stackTrace = new StackTrace(false); When I run the project in debug, the application keeps hanging on this line. My Environment: Windows 2003 Server...
3
by: Mark R. Dawson | last post by:
Hi all, I am trying to get custom attributes from a property. I can do this if I pass in the name of the property i.e. "Name" to the reflection methods, but if I pass in set_Name which is what...
8
by: Mike - EMAIL IGNORED | last post by:
I have a class that may or may not be inherited. Its constructor calls a function that should be called only if the class is not inherited. Is there a way to tell, other than simply passing a...
7
by: Morgan Cheng | last post by:
In the book *Programming C#* 4th editionby Jesse Liberty, it reads "Actually, the CLR guarantees to start running the static constructor before anything else is done with your class. However, it...
6
by: Rolandpish | last post by:
Hi there. I'm doing an application in C# 2005. I was used in VB6 to put code in Forms load event in order to initialize some values of the controls (grid values, text boxes values, label captions,...
3
by: rani.yaroshinski | last post by:
Hi all, The Stacktrace class (system.diagnostic) in CLR 2.0 (Framework 2.0), still offers a constructor to allow showing the stack-trace of another thread. However, the usage involves suspending...
3
by: =?Utf-8?B?TWFyayBDaGFubmluZw==?= | last post by:
I have a code which registers all threads with a thread dump class. At intervals this thread dump class will dump the stack trace of all threads. As calling StackTrace(threadtoDump) from a...
1
by: lesani | last post by:
hi, i want to find out stacktrace of a thread that is only have its thread id (which have created in vc++ project), i can find processthread by searching in ids of...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
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
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
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...
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...

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.