Remove symlink

This commit is contained in:
joopschilder committed 2020-12-14 15:41:14 +01:00
1 parent f2f3e9de88
commit a5ef2de3e4
3 files changed
+5 -6

No files matched your search

+3 -3
View File
@@ -42,15 +42,15 @@ class Context implements EventEmitterInterface
$this->eventLoop->run();
}
public function submit(callable $task, ...$args): void
public function submit(callable $job, ...$args): void
{
$this->eventLoop->futureTick(function () use ($task, $args) {
$this->eventLoop->futureTick(function () use ($job, $args) {
if ($this->concurrency->isReachedBy(count($this->workers))) {
$this->emit('congestion');
$this->workers->awaitCongestionRelief();
$this->emit('congestion_relieved');
}
$this->workers->createWorkerFor($task, $args);
$this->workers->createWorkerFor($job, $args);
});
}
+2 -2
View File
@@ -29,9 +29,9 @@ class Workers implements Countable, EventEmitterInterface
return count($this->workers);
}
public function createWorkerFor(callable $task, array $args = []): void
public function createWorkerFor(callable $job, array $args = []): void
{
$pid = $this->forkWorker($task, $args);
$pid = $this->forkWorker($job, $args);
$this->workers[$pid] = $pid;
$this->emit('worker_started', [$pid]);
}
-1
View File
@@ -1 +0,0 @@
src/Tests