]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: Improve the method of checking queue empty
authorFeng, Bob C <bob.c.feng@intel.com>
Mon, 3 Aug 2020 02:03:38 +0000 (10:03 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 7 Aug 2020 01:44:36 +0000 (01:44 +0000)
commitbfe36cb4efe577405aa4116a95e22a646fc8ee0c
tree895945ea76b8532260e80a577b73d8ffb81cb899
parentdcf51c05e83809a73f29cb2dce9424e1838639cf
BaseTools: Improve the method of checking queue empty

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2807

The Queue.empty() method is not reliable in the multiple
process runtime environment. This patch uses a new method
to check if all modules are processed and workers need
to be stopped. That is to add a None item at the bottom
of the queue. Worker check if it gets that None item to
know if all the module is processed.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Lucy Yan <lucyyan@google.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/AutoGenWorker.py
BaseTools/Source/Python/build/build.py