python global variable with thread,time.sleep(1)