Skip to content

Commit

Permalink
Remove SubprocPool code (#11070)
Browse files Browse the repository at this point in the history
This `SubprocPool` class was only being referenced in `RunTracker`, which was no longer using it for anything. This commit removes the imports and deletes the module.
  • Loading branch information
gshuflin authored Oct 28, 2020
1 parent be9ba87 commit 9dc89b6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
52 changes: 0 additions & 52 deletions src/python/pants/base/worker_pool.py

This file was deleted.

14 changes: 0 additions & 14 deletions src/python/pants/goal/run_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from pants.base.exiter import PANTS_FAILED_EXIT_CODE, PANTS_SUCCEEDED_EXIT_CODE, ExitCode
from pants.base.run_info import RunInfo
from pants.base.worker_pool import SubprocPool
from pants.base.workunit import WorkUnit, WorkUnitLabel
from pants.engine.internals.native import Native
from pants.goal.aggregated_timings import AggregatedTimings
Expand Down Expand Up @@ -169,10 +168,6 @@ def __init__(self, *args, **kwargs):
# For background work. Created lazily if needed.
self._background_root_workunit = None

# Trigger subproc pool init while our memory image is still clean (see SubprocPool docstring).
SubprocPool.set_num_processes(self._num_foreground_workers)
SubprocPool.foreground()

self._aborted = False

self._end_memoized_result: Optional[ExitCode] = None
Expand Down Expand Up @@ -310,8 +305,6 @@ def end(self) -> ExitCode:
if self._end_memoized_result is not None:
return self._end_memoized_result

self.shutdown_worker_pool()

self.end_workunit(self._main_root_workunit)

outcome = self._main_root_workunit.outcome()
Expand Down Expand Up @@ -375,13 +368,6 @@ def get_label(dep):

return critical_path_timings

def shutdown_worker_pool(self):
"""Shuts down the SubprocPool.
N.B. This exists only for internal use and to afford for fork()-safe operation in pantsd.
"""
SubprocPool.shutdown(self._aborted)

def get_options_to_record(self) -> dict:
recorded_options = {}
scopes = self.options.stats_option_scopes_to_record
Expand Down

0 comments on commit 9dc89b6

Please sign in to comment.