diff --git a/composer.json b/composer.json index dfacbfa..8fac57f 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "require": { "amphp/amp": "^2", "amphp/byte-stream": "^1", - "amphp/parallel": "^0.2" + "amphp/parallel": "^1" }, "require-dev": { "amphp/phpunit-util": "^1", diff --git a/lib/ParallelDriver.php b/lib/ParallelDriver.php index b69b275..efb7015 100644 --- a/lib/ParallelDriver.php +++ b/lib/ParallelDriver.php @@ -29,7 +29,7 @@ class ParallelDriver implements Driver { */ public function open(string $path, string $mode): Promise { return call(function () use ($path, $mode) { - $worker = $this->pool->get(); + $worker = $this->pool->getWorker(); try { list($id, $size, $mode) = yield $worker->enqueue(new Internal\FileTask("fopen", [$path, $mode])); } catch (TaskException $exception) {