is it possible to call a synchronized method from inside a synchronized method while waiting for resource to become available (using wait())? thanks
Java's mutexes are recursive, so you can invoke a synchronized method recursively or invoke another synchronized method for which you already hold a lock. You will need to tell us what it is you are specifically trying to do, though.... lots of stuff with thread locking/synchronization, if done incorrectly, can lead to deadlock, and it isn't entirely clear from your question what you are attempting to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With