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 Oct 8, 2024
1 parent 039928f commit a101b55
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 @@ -307,6 +307,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 a101b55

Please sign in to comment.