提交 f32fe486 编写于 作者: C Cleber Rosa

FDDrainer: remove unnecessary lock

This lock doesn't prevent, say, multiple drainers from writing to
a single location.  It's not a cross-instance lock so I fail to
see how it has any purpose at all.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 2f368a60
......@@ -331,7 +331,6 @@ class FDDrainer(object):
# automatically close. This may be used as the detection
# instead.
self._result = result
self._lock = threading.Lock()
self._thread = None
self._logger = logger
self._logger_prefix = logger_prefix
......@@ -356,7 +355,6 @@ class FDDrainer(object):
tmp = os.read(self.fd, 8192)
if tmp == '':
break
with self._lock:
self.data.write(tmp)
if self._verbose:
bfr += tmp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册