Skip to content

Commit

Permalink
fix multiproc worker when running in foreground
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ging committed Feb 12, 2025
1 parent 7eb1dc0 commit aa6ea75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/packg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .misc import format_exception

__all__ = ["Const", "format_exception"]
__version__ = "0.22.8"
__version__ = "0.22.9"
3 changes: 1 addition & 2 deletions src/packg/multiproc/multiproc_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ def run(self):
if self.workers == 0:
# no multiprocessing, queue is full, run one worker in foreground
self.q_in.put(None)
wi = self.target_class(0)
wi.setup(*self.target_class_args)
wi = self.target_class(0, self.target_class_args)
target_fn = wi.multi_fn_with_output if self.with_output else wi.multi_fn_no_output
target_fn(self.q_in, self.q_out, self.ignore_errors, foreground=True, desc=self.desc)
else:
Expand Down

0 comments on commit aa6ea75

Please sign in to comment.