Extracted Process Control to separate interface to allow better tests

This commit is contained in:
joopschilder committed 2020-12-11 13:23:57 +01:00
1 parent ffebc74a7d
commit 600f52567f
11 files changed
+287 -25

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ class Context implements EventEmitterInterface
$this->workers->on('worker_started', fn(int $pid) => $this->emit('worker_started', [$pid]));
$this->workers->on('worker_stopped', fn(int $pid) => $this->emit('worker_stopped', [$pid]));
$this->workers->on('worker_stopped', fn() => $this->emitIf($this->workers->empty(), 'no_workers_remaining'));
$this->workers->on('worker_stopped', fn() => $this->emitIf(empty($this->workers), 'no_workers_remaining'));
}
public function submit(callable $task, ...$args): void