Skip to content

Commit

Permalink
XXX: Remove locking from msis2 path
Browse files Browse the repository at this point in the history
  • Loading branch information
greglucas committed Nov 15, 2024
1 parent 6cc8ce3 commit 4a3be13
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions pymsis/msis.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,22 @@ def run(
version = "2.1"
msis_lib = msis21f

with _EXTENSION_LOCK[version]:
# Only reinitialize the model if the options have changed
if _LAST_USED_OPTIONS[version] != options:
msis_lib.pyinitswitch(options, parmpath=_MSIS_PARAM_PATH)
_LAST_USED_OPTIONS[version] = options

output = msis_lib.pymsiscalc(
input_data[:, 0],
input_data[:, 1],
input_data[:, 2],
input_data[:, 3],
input_data[:, 4],
input_data[:, 5],
input_data[:, 6],
input_data[:, 7:],
)
# with _EXTENSION_LOCK[version]:
# Only reinitialize the model if the options have changed
if _LAST_USED_OPTIONS[version] != options:
msis_lib.pyinitswitch(options, parmpath=_MSIS_PARAM_PATH)
_LAST_USED_OPTIONS[version] = options

output = msis_lib.pymsiscalc(
input_data[:, 0],
input_data[:, 1],
input_data[:, 2],
input_data[:, 3],
input_data[:, 4],
input_data[:, 5],
input_data[:, 6],
input_data[:, 7:],
)

else:
raise ValueError(
Expand Down

0 comments on commit 4a3be13

Please sign in to comment.