Skip to content

Commit

Permalink
Merge pull request #54 from WyriHaximus/Update-readme-examples
Browse files Browse the repository at this point in the history
Update readme examples
  • Loading branch information
WyriHaximus authored Jul 25, 2021
2 parents 80aefbd + 8d5cf65 commit 460d013
Showing 1 changed file with 3 additions and 9 deletions.
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

0 comments on commit 460d013

Please sign in to comment.