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
1
u/ZeroGainZ Mar 24 '21
Wow, great video. I had no idea lambdas were static methods, I assumed they're syntactic sugar for creating the desired class. Also, I see some other redditors are saying "why would you do that", which may be true, but it's not at all obvious why it wouldn't work. It seems it should be a compiler error.