Skip to content

Commit 017a1a5

Browse files
committed
Update README.md
1 parent 8c79645 commit 017a1a5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ The `sleep($seconds, LoopInterface $loop)` method can be used to wait/sleep for
9898
Block\sleep(1.5, $loop);
9999
```
100100

101-
Similar to PHP's [`sleep()`](http://php.net/sleep) function.
102-
Allows for floating point.
103-
Loop can perform other (async) tasks.
101+
While this may look similar to PHP's [`sleep()`](http://php.net/sleep) function,
102+
it's actual way more powerful:
103+
Instead of making the whole process sleep and handing over control to your operating system,
104+
this function actually executes the loop in the meantime.
105+
This is particularly useful if you've attached more async tasks to the same loop instance.
106+
If there are no other (async) tasks, this will behave similar to `sleep()`.
104107

105108
#### await()
106109

0 commit comments

Comments
 (0)