mirror of
https://github.com/danog/asyncConstruct.git
synced 2024-12-02 17:28:05 +01:00
20 lines
338 B
PHP
20 lines
338 B
PHP
|
<?php
|
||
|
|
||
|
namespace danog\Test\Fixtures;
|
||
|
|
||
|
use danog\BlockingConstruct;
|
||
|
|
||
|
use function Amp\delay;
|
||
|
|
||
|
class BlockingConstructTest
|
||
|
{
|
||
|
use BlockingConstruct;
|
||
|
public $inited = false;
|
||
|
protected function __construct_async(int $delay): \Generator
|
||
|
{
|
||
|
yield delay($delay);
|
||
|
$this->inited = true;
|
||
|
return true;
|
||
|
}
|
||
|
}
|