python 2.6 compliance stopping thread