Answer the question
In order to leave comments, you need to log in
Should ClassLoader be thread-safe? Does it make sense to cache loaded classes?
Java has such a thing as ClassLoader's, but the defineClass() method is not synchronized, as are the findClass() and loadClass() methods, which is strange, since different threads can access these methods at the same time, which is fraught with reloading For example.
Should I make a custom thread-safe loader?
And, as it seems to me, it should be closely related to this: Is it worth making a custom loader cacheable if loading a class is a lengthy process?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question