Skip to content

Commit 15b2a2d

Browse files
committed
don't set the original threads as the wrapper function already does that
1 parent 167a7f4 commit 15b2a2d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/squidpy/_utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,8 @@ def _unique_order_preserving(
5757

5858

5959
def _callback_wrapper(chosen_runner: Callable[..., Any], *args: Any, **kwargs: Any) -> Any:
60-
original_num_threads = numba.get_num_threads()
6160
numba.set_num_threads(1)
62-
try:
63-
return chosen_runner(*args, **kwargs)
64-
finally:
65-
numba.set_num_threads(original_num_threads)
61+
return chosen_runner(*args, **kwargs)
6662

6763

6864
class Signal(Enum):

0 commit comments

Comments
 (0)