pixelfederation/swoole-bundle

View on GitHub
src/Component/Locking/RecursiveOwner/RecursiveOwnerMutexFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace K911\Swoole\Component\Locking\RecursiveOwner;

use K911\Swoole\Component\Locking\MutexFactory;

class RecursiveOwnerMutexFactory implements MutexFactory
{
    public function __construct(private MutexFactory $wrapped)
    {
    }

    public function newMutex(): RecursiveOwnerMutex
    {
        return new RecursiveOwnerMutex($this->wrapped->newMutex());
    }
}