File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ If you are on Unix, check that you also have the following:
45
45
## Change log
46
46
Please see ` CHANGELOG.md ` .
47
47
48
- ## Example code
48
+ ## Example code and features
49
49
Tasks can be defined as PHP closures, or (recommended) as an instance of a class that implements ` AsyncTaskInterface ` .
50
50
51
51
A very simple example task to write Hello World to a file:
@@ -87,6 +87,11 @@ $task->withTimeLimit(15)->start();
87
87
$task->withoutTimeLimit()->start();
88
88
```
89
89
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
+
90
95
## Testing
91
96
PHPUnit via Composer script:
92
97
``` sh
You can’t perform that action at this time.
0 commit comments