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

34 lines
590 B
PHP

<?php
namespace Amp\Parallel\Worker\Internal;
use Amp\Promise;
/** @internal */
abstract class TaskResult
{
/** @var string Task identifier. */
private $id;
/**
* @param string $id Task identifier.
*/
public function __construct(string $id)
{
$this->id = $id;
}
/**
* @return string Task identifier.
*/
public function getId(): string
{
return $this->id;
}
/**
* @return \Amp\Promise<mixed> Resolved with the task result or failure reason.
*/
abstract public function promise(): Promise;
}