diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-07-31 13:33:31 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-09 23:15:55 +0800 |
commit | 1a624dd7cf0db5783b27e18e6c790178d14a1e6a (patch) | |
tree | 449e014c6c69d1c5a26f65b3c9880fee0fa33f77 /BaseTools/Source/Python/AutoGen/AutoGenWorker.py | |
parent | 4acae2b38edf28bc038799cee4c25744244f6167 (diff) | |
download | edk2-1a624dd7cf0db5783b27e18e6c790178d14a1e6a.tar.gz edk2-1a624dd7cf0db5783b27e18e6c790178d14a1e6a.tar.bz2 edk2-1a624dd7cf0db5783b27e18e6c790178d14a1e6a.zip |
BaseTools: Enable block queue log agent.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
To support Ctrl+S and Ctrl+Q, we enable block queue
for log.
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGenWorker.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py index 0a3c1d8e0e..e583828741 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py @@ -23,13 +23,14 @@ except: import traceback
import sys
from AutoGen.DataPipe import MemoryDataPipe
+import logging
+
def clearQ(q):
try:
while True:
q.get_nowait()
except Empty:
pass
-import logging
class LogAgent(threading.Thread):
def __init__(self,log_q,log_level,log_file=None):
@@ -123,9 +124,10 @@ class AutoGenManager(threading.Thread): def clearQueue(self):
taskq = self.autogen_workers[0].module_queue
+ logq = self.autogen_workers[0].log_q
clearQ(taskq)
clearQ(self.feedback_q)
-
+ clearQ(logq)
def TerminateWorkers(self):
self.error_event.set()
def kill(self):
|