Skip to content

Commit 4a36d12

Browse files
committed
[HOTFIX] Fix for MacOS
See #50 Set multiprocessing.set_start_method("fork") before initializing multiprocessing.Manager. Without this it will spawn an infinite number of subprocesses on Apple M1.
1 parent b4b512c commit 4a36d12

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

binary.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json
22
import multiprocessing
33
import os
4+
import platform
45
import random
56
import signal
67
import socket
@@ -19,7 +20,7 @@
1920
from simple_websocket_server import WebSocket
2021
from simple_websocket_server import WebSocketServer
2122

22-
BUILD_VERSION: str = "v0.3.0"
23+
BUILD_VERSION: str = "v0.3.1"
2324

2425
WINDOWS: bool = os.name == "nt"
2526
LOCALHOST: str = "127.0.0.1" if WINDOWS else "localhost"
@@ -32,7 +33,8 @@
3233
else:
3334
sys.exit("Invalid value of $NVIM_GHOST_LOGGING_ENABLED")
3435

35-
36+
if platform.system() == "Darwin":
37+
multiprocessing.set_start_method("fork")
3638
process_manager = multiprocessing.Manager()
3739
global_ns = process_manager.Namespace()
3840
global_ns.focused_nvim_addr = os.environ.get("NVIM_LISTEN_ADDRESS", None)

binary_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.3.0
1+
v0.3.1

0 commit comments

Comments
 (0)