Skip to content

Commit

Permalink
stop in python, closable only in scala
Browse files Browse the repository at this point in the history
  • Loading branch information
ehigham committed Sep 17, 2024
1 parent 06f224c commit 9cff2fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion hail/python/hail/backend/py4j_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def decode_bytearray(encoded):
self._jbackend = jbackend
self._jhc = jhc

self._backend_server = self._hail_package.backend.BackendServer.apply(self._jbackend)
self._backend_server = self._hail_package.backend.BackendServer(self._jbackend)
self._backend_server_port: int = self._backend_server.port()
self._backend_server.start()
self._requests_session = requests.Session()
Expand Down Expand Up @@ -310,6 +310,7 @@ def _to_java_blockmatrix_ir(self, ir):

def stop(self):
self._backend_server.close()
self._jbackend.close()
self._jhc.stop()
self._jhc = None
self._registered_ir_function_names = set()
Expand Down
2 changes: 1 addition & 1 deletion hail/python/hail/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def default_reference(self, value):

def stop(self):
assert self._backend
self._backend.close()
self._backend.stop()
self._backend = None
Env._hc = None
Env._dummy_table = None
Expand Down

0 comments on commit 9cff2fc

Please sign in to comment.