Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme examples #54

Merged
merged 1 commit into from
Jul 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,21 @@ composer require wyrihaximus/ticking-promise

declare(strict_types=1);

use React\EventLoop\Factory;

use function WyriHaximus\React\futurePromise;

$loop = Factory::create();

futurePromise($loop)->then(static function (): void {
futurePromise()->then(static function (): void {
echo 'Done', PHP_EOL;
});
futurePromise($loop)->then(static function (string $message): void {
futurePromise()->then(static function (string $message): void {
echo $message, PHP_EOL;
}, 'Also done');

$loop->run();
```

For more examples check the [examples directory](https://github.com/WyriHaximus/TickingPromise/tree/master/examples).

## License ##

Copyright 2020 [Cees-Jan Kiewiet](http://wyrihaximus.net/)
Copyright 2021 [Cees-Jan Kiewiet](http://wyrihaximus.net/)

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down