1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-02 17:52:14 +01:00
parallel/lib/Worker/Internal/Job.php
2017-05-18 09:51:31 +02:00

27 lines
472 B
PHP

<?php
namespace Amp\Parallel\Worker\Internal;
use Amp\Parallel\Worker\Task;
class Job {
/** @var string */
private $id;
/** @var \Amp\Parallel\Worker\Task */
private $task;
public function __construct(Task $task) {
$this->task = $task;
$this->id = \spl_object_hash($this->task);
}
public function getId(): string {
return $this->id;
}
public function getTask(): Task {
return $this->task;
}
}