I'm using a thrid-party lib that has a static synchronized method, i want to execute this method in parallel without modifiying its source.
What can i do ?
Should i create an executor service with a thread factory that sets a new context class loader ?
Thank you
A static synchronized method means its locked on the class. only one thread can grab the lock on the class. You can not even subclass this class at it won't allow you to override the static method.
I am afraid, you can not do anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With