Skip to content

Commit 8f5d8ad

Browse files
committed
Remove global run() and stop() functions
1 parent 6401dd9 commit 8f5d8ad

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

src/functions.php

-20
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,3 @@ function futureTick(callable $listener)
121121

122122
$loop->futureTick($listener);
123123
}
124-
125-
/**
126-
* Run the global event loop until there are no more tasks to perform.
127-
*/
128-
function run()
129-
{
130-
$loop = GlobalLoop::$loop ?: GlobalLoop::get();
131-
132-
$loop->run();
133-
}
134-
135-
/**
136-
* Instruct the running global event loop to stop.
137-
*/
138-
function stop()
139-
{
140-
$loop = GlobalLoop::$loop ?: GlobalLoop::get();
141-
142-
$loop->stop();
143-
}

tests/FunctionTest.php

-18
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,4 @@ public function testAddPeriodicTimer()
118118

119119
EventLoop\addPeriodicTimer($interval, $listener);
120120
}
121-
122-
public function testRun()
123-
{
124-
$this->globalLoop
125-
->expects($this->once())
126-
->method('run');
127-
128-
EventLoop\run();
129-
}
130-
131-
public function testStop()
132-
{
133-
$this->globalLoop
134-
->expects($this->once())
135-
->method('stop');
136-
137-
EventLoop\stop();
138-
}
139121
}

0 commit comments

Comments
 (0)