From 8309d5be1d362d82031b5e36218dad434dfb62d5 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 24 Dec 2022 19:04:18 +0100 Subject: [PATCH] Update --- README.md | 6 +++--- lib/Interfaces/LoopInterface.php | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 29102c9..4514344 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ abstract class Loop #### loop() -The `loop` [async coroutine](https://amphp.org/amp/coroutines/) will be run only once, every time the `start` method is called. +The `loop` [async fiber](https://amphp.org/) will be run only once, every time the `start` method is called. #### __toString() @@ -106,7 +106,7 @@ Pauses the loop for the specified number of milliseconds, or forever if `null` i #### resume() Forcefully resume the loop from the outside. -Returns a promise that is resolved when the loop is paused again. +Returns a future that is resolved when the loop is paused again. ### SignalLoop @@ -135,7 +135,7 @@ Signaling can be used as a message exchange mechanism a-la IPC, and can also be #### waitSignal() -Resolve the provided promise or return|throw passed signal. +Resolve the provided future or return|throw passed signal. ### ResumableSignalLoop diff --git a/lib/Interfaces/LoopInterface.php b/lib/Interfaces/LoopInterface.php index e43481c..0ee01eb 100644 --- a/lib/Interfaces/LoopInterface.php +++ b/lib/Interfaces/LoopInterface.php @@ -10,12 +10,14 @@ namespace danog\Loop\Interfaces; +use Stringable; + /** * Loop interface. * * @author Daniil Gentili */ -interface LoopInterface +interface LoopInterface extends Stringable { /** * Start the loop. @@ -27,10 +29,6 @@ interface LoopInterface * The actual loop function. */ public function loop(): void; - /** - * Get name of the loop. - */ - public function __toString(): string; /** * Check whether loop is running. */