From 1bd4f9e9444ff84185f505b2667b25d7e18d087e Mon Sep 17 00:00:00 2001 From: zhouwy2115 Date: Wed, 8 Apr 2020 20:03:01 +0800 Subject: [PATCH] update --- python/jittor/lock.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()