Forums Register Login

MOnitor inforomation?

+Pie Number of slices to send: Send
HellO!!
Is there a way for us to query what thread has the lock on the monitor and what threads are waiting for the monitor>?
+Pie Number of slices to send: Send
Not directly. You can extend the Thread class and add a method that will return the value of the call
Thread.holdsLock(monitor);
as long as you have a reference to the threads in question, this will give you your answer.
Our first order of business must be this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 621 times.
Similar Threads
wait() & notify()?
interrupt and wait
Thread
Monitor and Lock
What exactly is the "monitor"
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 08:30:00.