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

26 lines
355 B
PHP
Raw Normal View History

2020-04-16 17:17:37 +02:00
<?php
namespace Amp\Loop;
2020-04-16 17:59:02 +02:00
final class DriverControl
2020-04-16 17:17:37 +02:00
{
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)();
}
}