Skip to content

Commit

Permalink
Merge branch 'main' into notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard authored Aug 25, 2023
2 parents c384635 + ef3b288 commit d1f4bdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pycromanager/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (0, 28, 1)
version_info = (0, 28, 2)
__version__ = ".".join(map(str, version_info))
5 changes: 3 additions & 2 deletions pycromanager/acq_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

SUBPROCESSES = []

def cleanup():
def stop_headless():
for p in SUBPROCESSES:
p.terminate()
p.wait() # wait for process to terminate
SUBPROCESSES.clear()

# make sure any Java processes are cleaned up when Python exits
atexit.register(cleanup)
atexit.register(stop_headless)

def start_headless(
mm_app_path: str, config_file: str='', java_loc: str=None, core_log_path: str='',
Expand Down
2 changes: 1 addition & 1 deletion pycromanager/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pycromanager
from pycromanager import start_headless
from pycromanager.acq_util import cleanup
from pycromanager.acq_util import stop_headless
import socket

def is_port_in_use(port):
Expand Down

0 comments on commit d1f4bdd

Please sign in to comment.