File HANDLE/descriptor translation layer for Windows (#7657)

* Use TCP sockets on Windows with custom HANDLE <-> FD translation layer

* Get Plasma working on Windows

Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
mehrdadn
2020-03-23 21:08:25 -07:00
committed by GitHub
parent 2b80310e6f
commit b4030cdbbe
23 changed files with 1092 additions and 384 deletions
+16 -9
View File
@@ -89,6 +89,7 @@ class Node:
"workers/default_worker.py"))
self._resource_spec = None
self._localhost = socket.gethostbyname("localhost")
self._ray_params = ray_params
self._redis_address = ray_params.redis_address
self._config = ray_params._internal_config
@@ -396,15 +397,21 @@ class Node:
Args:
socket_path (string): the socket file to prepare.
"""
if socket_path is not None:
if os.path.exists(socket_path):
raise RuntimeError(
"Socket file {} exists!".format(socket_path))
socket_dir = os.path.dirname(socket_path)
try_to_create_directory(socket_dir)
return socket_path
return self._make_inc_temp(
prefix=default_prefix, directory_name=self._sockets_dir)
result = socket_path
if sys.platform == "win32":
if socket_path is None:
result = "tcp://{}:{}".format(self._localhost,
self._get_unused_port())
else:
if socket_path is None:
result = self._make_inc_temp(
prefix=default_prefix, directory_name=self._sockets_dir)
else:
if os.path.exists(socket_path):
raise RuntimeError(
"Socket file {} exists!".format(socket_path))
try_to_create_directory(os.path.dirname(socket_path))
return result
def start_reaper_process(self):
"""