Skip to content

Commit 319d60b

Browse files
authored
Update README.md
1 parent a2610b5 commit 319d60b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ use Terremoth\Async\PhpFile;
4343
use Terremoth\Async\Process;
4444

4545
$process = new Process();
46-
$process->send(function () {
46+
$age = 30;
47+
$name = 'John Doe';
48+
$fruits = ['orange', 'apple', 'grape'];
49+
50+
$process->send(function () use ($age, $name, $fruits) {
4751
/*
48-
// anything you want to process here
49-
// Important note: do not use closure vars, like:
50-
// $process->send(function () use ($var1, $var2, ...) { ... });
51-
// since the closure will be processed in another file.
52-
// Write everything you want without outside dependencies here
52+
// Anything you want to process here, you can use closure vars
5353
// In a future version I will create communications variables between both processes
5454
*/
5555
});

0 commit comments

Comments
 (0)