Skip to content

Commit d8f1c88

Browse files
committed
use existing multiprocessing import
1 parent 04bd6d3 commit d8f1c88

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nicegui/native/native_mode.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import _thread
4-
import multiprocessing
54
import multiprocessing as mp
65
import queue
76
import socket
@@ -93,8 +92,8 @@ def window_method_executor() -> None:
9392
except Exception:
9493
log.exception(f'error in window.{method_name}')
9594
# NOTE: we need to cleanup the multiprocessing queues, see https://github.com/zauberzeug/nicegui/issues/4131
96-
if hasattr(multiprocessing.util, '_exit_function'): # to make mypy happy
97-
multiprocessing.util._exit_function() # pylint: disable=protected-access
95+
if hasattr(mp.util, '_exit_function'): # to make mypy happy
96+
mp.util._exit_function() # pylint: disable=protected-access
9897

9998
Thread(target=window_method_executor).start()
10099

0 commit comments

Comments
 (0)