mirror of
https://github.com/danog/parallel.git
synced 2024-11-30 04:39:01 +01:00
34 lines
493 B
PHP
34 lines
493 B
PHP
<?php
|
|
|
|
namespace Amp\Parallel\Sync\Internal;
|
|
|
|
final class ParcelStorage extends \Threaded
|
|
{
|
|
/** @var mixed */
|
|
private $value;
|
|
|
|
/**
|
|
* @param mixed $value
|
|
*/
|
|
public function __construct($value)
|
|
{
|
|
$this->value = $value;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function get()
|
|
{
|
|
return $this->value;
|
|
}
|
|
|
|
/**
|
|
* @param mixed $value
|
|
*/
|
|
public function set($value): void
|
|
{
|
|
$this->value = $value;
|
|
}
|
|
}
|