Making isThreadAlive a bit faster.