Skip to content

Commit

Permalink
Avoiding using _CONFIG_VARS_LOCK when possible.
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 committed Nov 13, 2024
1 parent 59759ec commit df5ae08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/sysconfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@ def get_config_vars(*args):
# initialized, a virtual environment might have been activated, resulting in
# variables like sys.prefix changing their value, so we need to re-init the
# config vars (see GH-126789).
with _CONFIG_VARS_LOCK:
if _CONFIG_VARS['base'] != os.path.normpath(sys.prefix):
if _CONFIG_VARS['base'] != os.path.normpath(sys.prefix):
with _CONFIG_VARS_LOCK:
_CONFIG_VARS_INITIALIZED = False
_init_config_vars()

Expand Down

0 comments on commit df5ae08

Please sign in to comment.