asyncConstruct/test/Fixtures/BlockingConstructTest.php

20 lines
338 B
PHP
Raw Normal View History

2020-07-31 15:09:34 +02:00
<?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;
}
}