Your understanding about the classloader has a little wrong, ThreadPoolExecutor is in the rt.jar, which means only AppClassLoader(JVM's) could load it no matter what we do.
Sheng Wu 吴晟 Twitter, wusheng1108 Li BingLong(智能平台) <[email protected]> 于2021年1月4日周一 下午4:57写道: > Yes, I have known the point. > In FileWriter, it’s the code "Executors.newSingleThreadScheduledExecutor" > introduce the ThreadPoolExecutor. We even can not see the > ThreadPoolExecutor code. > > So, the different classloader that I mentioned is like a sandbox. > It's just like that maven-plugin has it's own classloader. > The agent should has own classloader, too.The agent code should run in the > classloader.They don't need to care about when the user classloader load > ThreadPoolExecutor or any other class. > > 在 2021/1/4 下午4:32,“Sheng Wu”<[email protected]> 写入: > > I don't mean that. The thing is, this class(specific for > ThreadPoolExecutor), could be introduced into the classloader by many > things, we even don't know it is added. > > > Or can we use different classloader when running agent core code? > > It is already, but think about this, who loads ThreadPoolExecutor? This > isn't the SkyWalking classloader's responsibility. > > Sheng Wu 吴晟 > Twitter, wusheng1108 > > > >
