标签:read python open threading pen release write text close
mutex = threading.Lock() def write_to_file(file_name,text): mutex.acquire() a = open(file_name,‘a‘) a.write(text+"\n") a.close() mutex.release()
标签:read python open threading pen release write text close
原文地址:https://www.cnblogs.com/yakoazz/p/10803526.html