From 08793c82074df290d92feeca04dffaeb117890b9 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 24 Jan 2023 15:54:36 +0100 Subject: [PATCH] Improve docs --- README.md | 3 +++ lib/Loop.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 69d73bf..edc2486 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,9 @@ abstract class Loop /** * Resume the loop. * + * If resume is called multiple times, and the event loop hasn't resumed the loop yet, + * the loop will be resumed only once, not N times for every call. + * * @return bool Returns false if the loop is not paused. */ public function resume(): bool; diff --git a/lib/Loop.php b/lib/Loop.php index f2b1945..733e33a 100644 --- a/lib/Loop.php +++ b/lib/Loop.php @@ -218,6 +218,9 @@ abstract class Loop implements Stringable /** * Resume the loop. * + * If resume is called multiple times, and the event loop hasn't resumed the loop yet, + * the loop will be resumed only once, not N times for every call. + * * @return bool Returns false if the loop is not paused. */ public function resume(): bool