Code: Select all
_spawnTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new SpawnMonstersTask(activeChar), 2000, 6000);
And, is this code right to stop this thread?
Code: Select all
_spawnTask.cancel(true);
Code: Select all
_spawnTask = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new SpawnMonstersTask(activeChar), 2000, 6000);
Code: Select all
_spawnTask.cancel(true);
I don't ask this, I want to know where in the code is the location where all threads close as the player logs out.Probe wrote:yes, inside a try-catch block