def _threadShouldStop( self):
		""" Return true if there's a reason the thread should stop"""
		manualStop = self.stopThread 
		mainThreadGone = not self.callingThread.isAlive() 
		somethingStalled = self._pingCount == 0
		self._pingCount = 0

		return manualStop or mainThreadGone or somethingStalled
 Return true if there's a reason the thread should stop
recipes/Python/82235_Managing_thread_lifetime/recipe-82235.py