Maybe i'm being naive about Threads.
David Holmes - Sun Microsystems
David.Holmes at Sun.COM
Sun Nov 22 12:29:32 UTC 2009
Paulo Levi said the following on 11/21/09 16:48:
> But i'm wondering why there isn't a global jvm system option for the new
> Thread(runnable).start() to perserve stack traces at least until the
> start method.
Why? Probably because not enough people have considered it to be a
necessary thing to have.
It is mostly folks who think there is, or should be, a special
relationship between a thread and its starting thread, that try to
maintain some connection between the two. But Java threads, like
PThreads, UI threads, and others before it, define sibling threads not
> Seems like a no brainer so that tools (like the netbeans debugger) can
> find where the misbehaving threads originate from, (instead of like now,
> where i have to depend on the names). Or am i missing something obvious?
You're not missing anything in the sense there is no direct support for
this, but as others have pointed out it is not difficult to construct it
yourself _if_ you have control of the thread creation code. If you don't
then I think you are stuck.
More information about the core-libs-dev