class SimpleCov::ParallelAdapters::Base
@see SimpleCov::ParallelAdapters for the registry and selection.
optional hook for waiting on sibling workers.
process is the one that should do final-result work, and provide an
answer a small fixed set of questions about whether THIS worker
Adapters are classes (used as singletons, never instantiated) — they
falls back to “behave like a single-process run.”
Real adapters subclass and override what they need; everything else
Default no-op implementations for a parallel-test-runner adapter.
def active?
are tried in registration order; the first one whose `active?`
Should this adapter be selected for the current process? Adapters
def active? false end
def expected_worker_count
by the polling fallback to know how many resultset entries to
How many parallel workers are participating in this run. Used
def expected_worker_count 1 end
def first_worker?
run threshold checks, format the report)? Default is `true`
the final-result work (wait for siblings, merge resultsets,
Among the parallel workers in this run, should THIS worker do
def first_worker? true end
def native_wait?
`parallel_wait_timeout` for workers that produced no coverage.
`expected_worker_count` as final instead of waiting out the whole
reporting worker can accept a settled resultset count below
exited (so no further resultset can appear)? When true, the
Does `wait_for_siblings` block until every sibling PROCESS has
def native_wait? false end
def wait_for_siblings
lower latency; otherwise SimpleCov polls the resultset cache
`wait_for_other_processes_to_finish`) implements this for
with a native synchronization primitive (e.g., `parallel_tests`'s
their resultsets. An adapter that wraps a parallel-test runner
Optional: block until sibling workers have finished writing
def wait_for_siblings # No-op default; polling fallback handles correctness. end