mirror of
https://github.com/danog/amp.git
synced 2024-12-04 18:38:17 +01:00
Remove another leftover
Forgot this when FiberScheduler was dropped.
This commit is contained in:
parent
41b9af525d
commit
8892b619a5
@ -4,13 +4,6 @@ namespace Amp\Loop;
|
|||||||
|
|
||||||
interface Driver
|
interface Driver
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Get the fiber scheduler associated with this driver.
|
|
||||||
*
|
|
||||||
* @return \FiberScheduler
|
|
||||||
*/
|
|
||||||
public function getScheduler(): \FiberScheduler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the event loop.
|
* Run the event loop.
|
||||||
*
|
*
|
||||||
|
@ -41,22 +41,6 @@ abstract class DriverFoundation implements Driver
|
|||||||
|
|
||||||
private bool $running = false;
|
private bool $running = false;
|
||||||
|
|
||||||
private \FiberScheduler $scheduler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the fiber scheduler associated with this driver.
|
|
||||||
*
|
|
||||||
* @return \FiberScheduler
|
|
||||||
*/
|
|
||||||
public function getScheduler(): \FiberScheduler
|
|
||||||
{
|
|
||||||
if (!isset($this->scheduler) || $this->scheduler->isTerminated()) {
|
|
||||||
$this->scheduler = new \FiberScheduler(fn() => $this->run());
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->scheduler;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the event loop.
|
* Run the event loop.
|
||||||
*
|
*
|
||||||
|
@ -25,11 +25,6 @@ final class TracingDriver implements Driver
|
|||||||
$this->driver = $driver;
|
$this->driver = $driver;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getScheduler(): \FiberScheduler
|
|
||||||
{
|
|
||||||
return $this->driver->getScheduler();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
$this->driver->run();
|
$this->driver->run();
|
||||||
|
Loading…
Reference in New Issue
Block a user