1
0
mirror of https://github.com/danog/parallel.git synced 2025-01-07 13:18:22 +01:00
parallel/tests/Worker/TestTask.php
2016-01-23 00:00:56 -06:00

20 lines
379 B
PHP

<?php
namespace Icicle\Tests\Concurrent\Worker;
use Icicle\Concurrent\Worker\{Environment, Task};
class TestTask implements Task
{
private $returnValue;
public function __construct($returnValue)
{
$this->returnValue = $returnValue;
}
public function run(Environment $environment): \Generator
{
return yield $this->returnValue;
}
}