1
0
mirror of https://github.com/danog/amp.git synced 2024-12-04 18:38:17 +01:00
amp/lib/Loop/DriverControl.php
2020-04-16 10:59:02 -05:00

26 lines
355 B
PHP

<?php
namespace Amp\Loop;
final class DriverControl
{
private $run;
private $stop;
public function __construct(callable $run, callable $stop)
{
$this->run = $run;
$this->stop = $stop;
}
public function run()
{
($this->run)();
}
public function stop()
{
($this->stop)();
}
}