#Is nested Synchronization needed? (image related)
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
you are correct
this is equivalent to
synchronized (this) {
synchronized (this) {
}
}
which is redundant
I will say there are reasons to not use synchronized (this)
and even more reasons to not use wait/notify/notifyAll
thanks for answering
teacher wont respond to emails and stuff like this appeared many times in the pdfs
also e.printStackTrace() isn't what you should do with an InterruptedException usually
thatll be an issue for post-school me, but ill keep it in mind
throw new RuntimeException(e);
aight 👍
yeah - the java.util.concurrent package has a bunch of stuff that makes using those mechanisms very rarely the right thing to do
java concurrency in practice i've heard is a good book on that
thanks for informing me, ill take a look someday
is there anything i need to do now or do i just leave this post be?
you can close this with /help-thread close if you dont have any more questions :)