Remove symlink

This commit is contained in:
2020-12-14 15:41:14 +01:00
parent f2f3e9de88
commit a5ef2de3e4
3 changed files with 5 additions and 6 deletions

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);
});
}