McModLauncher / modlauncher

Java 21 mod launcher
Other
171 stars 47 forks source link

Fix deadlock caused by missing parallel nature on DelegatedClassLoader #11

Closed tterrag1098 closed 5 years ago

tterrag1098 commented 5 years ago

Turns out this was a simple one - due to the nature of how ClassLoader.registerAsParallelCapable works, it does not check for child classes, and so DelegatedClassLoader must also be registered.

This required me to make it a static nested class rather than an inner class, as otherwise there is no way to use a static initializer inside the class, and the method is caller sensitive (seriously, wtf is this API? just have a version that accepts a Class<?>).

cpw commented 5 years ago

Closing. Fixed in 2ac5413d0fa889aae60b4ed6af32c619fca79e68