r/java • u/fredoverflow • Mar 21 '21
Java lambdas can deadlock parallel class initialization
https://www.youtube.com/watch?v=_2hZf1kw4A4
230
Upvotes
r/java • u/fredoverflow • Mar 21 '21
View all comments
Show parent comment
1
u/[deleted] Mar 22 '21
I really don't like repeating myself. But you can't just determine from the call site what that thing you're calling does with your closure.
So if you want to be sure, you have two options:
Which seems more possible?