This PR registers two class loaders onto SqlSlaveThread — Server::getInstance()->getLoader() (to load DEVirion plugin's VirionClassLoader class) and DEVirion's class loader (to load virions classes) when running in a dev environment (!libasynql::isPackaged()).
This PR removes CommonThreadPartsTrait::registerClassLoader() method call from SqlSlaveThread::onRun() as CommonThreadPartsTrait calls this method by itself in it's final CommonThreadPartsTrait::run() method before it calls CommonThreadPartsTrait::onRun() (or in this case, SqlSlaveThread::onRun()).
Recently, PM4 removed
CommonThreadPartsTrait::setClassLoader(?ClassLoader)
and addedCommonThreadPartsTrait::setClassLoaders(?ClassLoader[])
which appends an array of class loaders to existing class loaders of a given thread (https://github.com/pmmp/PocketMine-MP/commit/5fbc7681b04fe702fcbd43940b9d325e5c216707).This PR registers two class loaders onto
SqlSlaveThread
—Server::getInstance()->getLoader()
(to load DEVirion plugin's VirionClassLoader class) and DEVirion's class loader (to load virions classes) when running in a dev environment (!libasynql::isPackaged()
).This PR removes
CommonThreadPartsTrait::registerClassLoader()
method call fromSqlSlaveThread::onRun()
as CommonThreadPartsTrait calls this method by itself in it'sfinal CommonThreadPartsTrait::run()
method before it callsCommonThreadPartsTrait::onRun()
(or in this case,SqlSlaveThread::onRun()
).Related Issues:
62