From 836e0ebb039c61e14d673811980e840cbbefba21 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Sat, 27 Oct 2018 10:21:18 -0500 Subject: [PATCH] Update to amphp/parallel v1.0 --- composer.json | 2 +- lib/ParallelDriver.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {