diff --git a/python/jittor/lock.py b/python/jittor/lock.py index 53c30cc2..99dccac5 100644 --- a/python/jittor/lock.py +++ b/python/jittor/lock.py @@ -5,15 +5,15 @@ from jittor_utils import cache_path class Lock: def __init__(self, filename): self.handle = open(filename, 'w') - print(f'创建锁 {filename}') + print(f'创建锁 {filename} PID {os.getpid()}') def lock(self): ret = fcntl.flock(self.handle, fcntl.LOCK_EX) - print(f'加锁成功 {ret}') + print(f'加锁成功 {ret} PID {os.getpid()}') def unlock(self): ret = fcntl.flock(self.handle, fcntl.LOCK_UN) - print(f'释放锁成功 {ret}') + print(f'释放锁成功 {ret} PID {os.getpid()}') def __del__(self): self.handle.close()