mirror of
https://github.com/danog/amp.git
synced 2024-12-03 09:57:51 +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
|
||||
{
|
||||
/**
|
||||
* Get the fiber scheduler associated with this driver.
|
||||
*
|
||||
* @return \FiberScheduler
|
||||
*/
|
||||
public function getScheduler(): \FiberScheduler;
|
||||
|
||||
/**
|
||||
* Run the event loop.
|
||||
*
|
||||
|
@ -41,22 +41,6 @@ abstract class DriverFoundation implements Driver
|
||||
|
||||
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.
|
||||
*
|
||||
|
@ -25,11 +25,6 @@ final class TracingDriver implements Driver
|
||||
$this->driver = $driver;
|
||||
}
|
||||
|
||||
public function getScheduler(): \FiberScheduler
|
||||
{
|
||||
return $this->driver->getScheduler();
|
||||
}
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$this->driver->run();
|
||||
|
Loading…
Reference in New Issue
Block a user