I agree that the debugger can do this, but it isn't easy. You'd have to
go thread and thread and manually check the entire stack-trace for
locks. I was also hoping that the IDE would make it easier to visualize
this information.
As an aside, the profiler has a view you might find more useful. I
believe it is called "Thread instrumentation" or "Lock instrumentation".
Either way, it shows you which locks each thread is holding, and waiting
on. That, again, is moving in the right direction but not the full
picture either.
I think what is missing is a lock-centric view, where you have a list of
locks and the sub-nodes are the threads interacting on them. This would
make it easier to see (for example) that a lock is a point of contention
(blocking a lot of threads).
Gili
On 2018-02-26 6:52 AM, Antonio wrote:
AFAIK the debugger can do this. Just add a breakpoint and then take a
look at the rest of running threads, to see what they're doing.
Cheers,
Antonio
On 26/02/18 10:04, Owen Thomas wrote:
Hello.
I've been working with threads, and I would like to know if the IDE
can show me where I have obtained a lock (using the "synchronized"
keyword) on a particular type?
I think this should be something the IDE should in theory be able to
do...
Owen.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists