Skip to content

Commit 6bbd1e6

Browse files
committed
Added note about JSON encodable array
1 parent 3c565e7 commit 6bbd1e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ composer require wyrihaximus/react-child-process-promise-closure
1919

2020
## Usage ##
2121

22-
Usage is simple, just pass the function the event loop and a closure that returns an array as result or throws a `Throwable` on errors and it will run in a freshly spawned child process.
22+
Usage is simple, just pass the function the event loop and a closure that returns an JSON encodable array as result or throws a `Throwable` on errors and it will run in a freshly spawned child process.
2323

2424
```php
2525
use function WyriHaximus\React\childProcessPromiseClosure;
2626

2727
childProcessPromiseClosure($loop, function () {
28-
return ['message' => 'The closure MUST always return an array'];
28+
return ['message' => 'The closure MUST always return an JSON encodable array'];
2929
})->done(function ($time) {
3030
echo $time['message'], PHP_EOL;
3131
});

0 commit comments

Comments
 (0)