mirror of
https://github.com/danog/amp.git
synced 2024-12-03 18:07:57 +01:00
Merge pull request #26 from async-interop/loop-name
Rename EventLoop → Loop and EventLoopDriver → LoopDriver
This commit is contained in:
commit
deb801b941
@ -2,10 +2,10 @@
|
||||
|
||||
namespace Interop\Async\EventLoop;
|
||||
|
||||
final class EventLoop
|
||||
final class Loop
|
||||
{
|
||||
/**
|
||||
* @var EventLoopDriver
|
||||
* @var LoopDriver
|
||||
*/
|
||||
private static $driver = null;
|
||||
|
||||
@ -13,11 +13,11 @@ final class EventLoop
|
||||
* Execute a callback within the scope of an event loop driver.
|
||||
*
|
||||
* @param callable $callback The callback to execute
|
||||
* @param EventLoopDriver $driver The event loop driver
|
||||
* @param LoopDriver $driver The event loop driver
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function execute(callable $callback, EventLoopDriver $driver)
|
||||
public static function execute(callable $callback, LoopDriver $driver)
|
||||
{
|
||||
$previousDriver = self::$driver;
|
||||
|
||||
@ -35,7 +35,7 @@ final class EventLoop
|
||||
/**
|
||||
* Retrieve the event loop driver that is in scope.
|
||||
*
|
||||
* @return EventLoopDriver
|
||||
* @return LoopDriver
|
||||
*/
|
||||
public static function get()
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Interop\Async\EventLoop;
|
||||
|
||||
interface EventLoopDriver
|
||||
interface LoopDriver
|
||||
{
|
||||
/**
|
||||
* Start the event loop.
|
Loading…
Reference in New Issue
Block a user