ok

Mini Shell

Direktori : /home2/selectio/public_html/fms-worksuite/vendor/amphp/sync/src/
Upload File :
Current File : /home2/selectio/public_html/fms-worksuite/vendor/amphp/sync/src/PrefixedKeyedMutex.php

<?php

namespace Amp\Sync;

use Amp\Promise;

final class PrefixedKeyedMutex implements KeyedMutex
{
    /** @var KeyedMutex */
    private $mutex;

    /** @var string */
    private $prefix;

    public function __construct(KeyedMutex $mutex, string $prefix)
    {
        $this->mutex = $mutex;
        $this->prefix = $prefix;
    }

    public function acquire(string $key): Promise
    {
        return $this->mutex->acquire($this->prefix . $key);
    }
}

Zerion Mini Shell 1.0