1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

utils/misc: Use RLock for check_output_lock

Using a threading.Lock leads to a deadlock in some circumstances.
This commit is contained in:
Douglas Raillard 2021-07-21 12:25:23 +01:00 committed by Marc Bonnici
parent 6249c06b44
commit b64ec714a0

View File

@ -153,7 +153,7 @@ def preexec_function():
check_output_logger = logging.getLogger('check_output') check_output_logger = logging.getLogger('check_output')
# Popen is not thread safe. If two threads attempt to call it at the same time, # Popen is not thread safe. If two threads attempt to call it at the same time,
# one may lock up. See https://bugs.python.org/issue12739. # one may lock up. See https://bugs.python.org/issue12739.
check_output_lock = threading.Lock() check_output_lock = threading.RLock()
def get_subprocess(command, **kwargs): def get_subprocess(command, **kwargs):