We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd39ff commit 936814fCopy full SHA for 936814f
README.md
@@ -18,22 +18,16 @@ composer require react-parallel/runtime
18
# Usage
19
20
```php
21
-use React\EventLoop\Factory;
22
use ReactParallel\Runtime\Runtime;
23
-use ReactParallel\FutureToPromiseConverter\FutureToPromiseConverter;
+use ReactParallel\EventLoop\EventLoopBridge;
24
25
-$loop = Factory::create();
26
-$runtime = Runtime::create(new FutureToPromiseConverter($loop));
+$runtime = Runtime::create(new EventLoopBridge());
27
28
-$runtime->run(function () {
+echo $runtime->run(function (): int {
29
sleep(3);
30
31
return 3;
32
-})->done(function (int $int): void {
33
- echo $int, PHP_EOL;
34
-});
35
-
36
-$loop->run();
+}), PHP_EOL;
37
```
38
39
## Contributing ##
0 commit comments