Skip to content

Commit f3d5d73

Browse files
committed
Include some tips
1 parent 17dbefa commit f3d5d73

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ If you are on Unix, check that you also have the following:
4545
## Change log
4646
Please see `CHANGELOG.md`.
4747

48-
## Example code
48+
## Example code and features
4949
Tasks can be defined as PHP closures, or (recommended) as an instance of a class that implements `AsyncTaskInterface`.
5050

5151
A very simple example task to write Hello World to a file:
@@ -87,6 +87,11 @@ $task->withTimeLimit(15)->start();
8787
$task->withoutTimeLimit()->start();
8888
```
8989

90+
Some tips:
91+
- Don't sleep too long! On Windows, timeout handlers cannot trigger while your task is sleeping.
92+
- Use short but frequent sleeps instead.
93+
- Avoid using `SIGINT`! On Unix, this signal is reserved for timeout detection.
94+
9095
## Testing
9196
PHPUnit via Composer script:
9297
```sh

0 commit comments

Comments
 (0)