1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-03 18:17:52 +01:00
parallel/lib/Worker/Internal/TaskSuccess.php
Aaron Piotrowski b654463339
Fix code style
2018-10-07 09:50:45 -05:00

25 lines
428 B
PHP

<?php
namespace Amp\Parallel\Worker\Internal;
use Amp\Promise;
use Amp\Success;
/** @internal */
class TaskSuccess extends TaskResult
{
/** @var mixed Result of task. */
private $result;
public function __construct(string $id, $result)
{
parent::__construct($id);
$this->result = $result;
}
public function promise(): Promise
{
return new Success($this->result);
}
}