2016-08-22 06:40:48 +02:00
|
|
|
<?php declare(strict_types = 1);
|
2015-08-29 03:55:30 +02:00
|
|
|
|
2016-08-19 00:36:58 +02:00
|
|
|
namespace Amp\Concurrent\Test\Worker;
|
2016-08-18 18:04:48 +02:00
|
|
|
|
2016-08-19 00:36:58 +02:00
|
|
|
use Amp\Concurrent\Worker\{ Environment, Task };
|
2015-08-29 03:55:30 +02:00
|
|
|
|
2016-08-19 00:36:58 +02:00
|
|
|
class TestTask implements Task {
|
2015-08-29 03:55:30 +02:00
|
|
|
private $returnValue;
|
|
|
|
|
2016-08-19 00:36:58 +02:00
|
|
|
public function __construct($returnValue) {
|
2015-08-29 03:55:30 +02:00
|
|
|
$this->returnValue = $returnValue;
|
|
|
|
}
|
|
|
|
|
2016-08-19 00:36:58 +02:00
|
|
|
public function run(Environment $environment) {
|
2016-01-25 06:04:29 +01:00
|
|
|
return $this->returnValue;
|
2015-08-29 03:55:30 +02:00
|
|
|
}
|
|
|
|
}
|