1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-12 09:09:35 +01:00
parallel/lib/Worker/Internal/Job.php

27 lines
488 B
PHP
Raw Normal View History

2016-12-30 02:16:04 +01:00
<?php
2016-08-23 23:47:40 +02:00
namespace Amp\Parallel\Worker\Internal;
2016-08-23 23:47:40 +02:00
use Amp\Parallel\Worker\Task;
class Job {
/** @var string */
private $id;
2016-08-23 23:47:40 +02:00
/** @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;
}
}