some implement for python mulithread