[Help] please help with this thread thing...
Posted: Fri Aug 20, 2010 10:50 pm
I put my own thread at a place in the code as follows:
I want this thread to stop when the player logs out. Where is the place where all the player's threads are killed when he logs out, so I put the code to stop it?
And, is this code right to stop this thread?
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);