simple practices for multi-thread programing of python