未验证 提交 0d5230d1 编写于 作者: B Bin Long 提交者: GitHub

Merge pull request #405 from ShenYuhan/unlock

close fp after unlock
......@@ -31,6 +31,7 @@ class Lock(object):
if cmd == self.lock.LOCK_UN:
Lock._owner = None
self.lock.flock(fp, cmd)
fp.close()
elif cmd == self.lock.LOCK_EX:
if Lock._owner is None:
Lock._owner = os.getpid()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册