Re: ToolHelp thread count doesn't match debugger



"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> writes:

[...]

What's odd is that when I start my app, at the first line in main,
there are 6 threads running; once it gets up and running there are
9-10. When I ran it a few days ago, while it was running there
were 2-3 (I didn't check threads when the program started). I have
no idea what could cause that.

Not odd at all. The CLR runs threads to do things, plus many
managed objects spin up worker threads to do work without you
explicitly asking for a thread. 9-10 doesn't seem crazy to me for a
large app, especially if it's doing any async monitoring.

What I thought was odd was the first time I ran it, it had 2-3
threads, but the next time it had 9-10. Today, I suddenly realized
what I suspect is the difference: between the two runs, I had set the
registry key which makes .NET applications run in "debug mode" so I
can attach the Visual Studio debugger once it is running (that didn't
work, but that's another story).

Now what's interesting is that since I have set that flag, my app has
been more stable than it's ever been. Before setting the flag, after
a few days of running, the network on the device will often cease to
function properly with no explanation; just DNS won't work anymore
until I reset the device, or at least disable/enable the interface.
Since I set that flag that hasn't happened. Very odd. If anybody has
suggestions of what that could mean, I'd appreciate it.

----Scott.
.



Relevant Pages

  • Re: ToolHelp thread count doesnt match debugger
    ... Not odd at all. ... What I thought was odd was the first time I ran it, ... Now what's interesting is that since I have set that flag, my app has ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: ToolHelp thread count doesnt match debugger
    ... Not odd at all. ... What I thought was odd was the first time I ran it, ... Now what's interesting is that since I have set that flag, my app has ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: CommonDialog returns wrong context
    ... I tried setting the flag: it does not solve my problem. ... Probably because my app is calling the 'Print' CommonDialog (for which the ... connectionstrings are pointing to a database in the current path. ... connectionstring in the form load procedure does not help because of the Ado ...
    (microsoft.public.vb.bugs)
  • Re: "its time that we do"
    ... > failure to do this flaggy kind of thing: but I suppose it would be a ... still find it a bit odd to see the huge flags flown by used car dealers ... rallies to salute the flag as it passed. ...
    (alt.usage.english)
  • Re: "its time that we do"
    ... >> failure to do this flaggy kind of thing: but I suppose it would be a ... >still find it a bit odd to see the huge flags flown by used car dealers ... >rallies to salute the flag as it passed. ...
    (alt.usage.english)

Quantcast