Skip to content

Commit df5ae08

Browse files
committed
Avoiding using _CONFIG_VARS_LOCK when possible.
Signed-off-by: Filipe Laíns <[email protected]>
1 parent 59759ec commit df5ae08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/sysconfig/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ def get_config_vars(*args):
556556
# initialized, a virtual environment might have been activated, resulting in
557557
# variables like sys.prefix changing their value, so we need to re-init the
558558
# config vars (see GH-126789).
559-
with _CONFIG_VARS_LOCK:
560-
if _CONFIG_VARS['base'] != os.path.normpath(sys.prefix):
559+
if _CONFIG_VARS['base'] != os.path.normpath(sys.prefix):
560+
with _CONFIG_VARS_LOCK:
561561
_CONFIG_VARS_INITIALIZED = False
562562
_init_config_vars()
563563

0 commit comments

Comments
 (0)