1
0
mirror of https://github.com/danog/amp.git synced 2024-12-04 10:28:01 +01:00
Commit Graph

67 Commits

Author SHA1 Message Date
Niklas Keller
f2bd72a020 Add cancellation example 2021-12-23 01:02:01 +01:00
Niklas Keller
e44a190dd4 Improve async example 2021-12-12 21:09:19 +01:00
Niklas Keller
1a0869098b Add async example 2021-12-12 21:06:34 +01:00
Aaron Piotrowski
bfe8d635b8
Export Pipeline to separate repo 2021-09-05 23:47:06 -05:00
Aaron Piotrowski
de7f7e0b64
Fix some Psalm issues 2021-09-03 18:15:31 -05:00
Aaron Piotrowski
820bbd2058
Use Revolt Futures, drop Promises 2021-04-04 13:10:23 -05:00
Aaron Piotrowski
4290bd7e28
Update to simpler ext-fiber API 2021-02-11 23:02:31 -06:00
Markus Staab
870af820e5
Remove leftover (#337) 2021-01-06 22:02:13 +01:00
Markus Staab
f1d87b6e6f
Fix typo (#336) 2021-01-06 21:44:18 +01:00
Aaron Piotrowski
fa31b4b3d5
Pipeline extends Traversable
Allows pipelines to be used directly with foreach.
2020-11-10 12:05:47 -06:00
Aaron Piotrowski
cecbbd3f40
Drop sleep() and refactor delay to use await() 2020-10-06 23:40:14 -05:00
Aaron Piotrowski
72b50523a3
Add separate method to await back pressure 2020-09-25 12:32:37 -05:00
Aaron Piotrowski
8e4cc1bbd1
Refactor Pipeline for async/await 2020-09-24 22:14:58 -05:00
Aaron Piotrowski
5f6db028ab
Initial fiber support 2020-09-24 12:53:32 -05:00
Aaron Piotrowski
5e521daa16
Rename to Pipeline 2020-09-24 12:53:31 -05:00
Aaron Piotrowski
b64b3affc9
Rename yield() to emit() 2020-09-24 12:53:30 -05:00
Aaron Piotrowski
66f0deb563
Drop YieldedValue 2020-09-24 12:53:29 -05:00
Aaron Piotrowski
d496c9db24
Resolve promise with YieldedValue
A suggested alternative to resolving with [$yieldedValue] since static analysis (specifically Psalm) doesn't play well with that API.

Will revert if Psalm changes or we decide to resolve with [$yieldedValue] anyway.
2020-09-24 12:53:29 -05:00
Aaron Piotrowski
96007f11aa
Add Streams 2020-09-24 12:53:27 -05:00
Niklas Keller
1e58d53e4a Fix code style and run PsalmTest only on PHP 7.1+ 2020-04-30 06:54:50 +02:00
Niklas Keller
17e2c2344c Improve call / coroutine / wait types, add psalm test 2020-04-30 06:46:52 +02:00
Niklas Keller
3d250cbe30 Cover examples with psalm and add @psalm-yield to Promise 2020-04-04 15:49:26 +02:00
Aaron Piotrowski
a726db92a5 Only create deferred for backpressure if necessary 2019-09-21 18:30:14 +02:00
Markus Staab
4e822395c9 Fix typo (#268) 2019-04-18 18:41:34 +02:00
Niklas Keller
fa3fe1d20b Apply PSR-2 2018-06-18 20:00:01 +02:00
Niklas Keller
118ed983be Fix code style 2018-01-08 22:00:15 +01:00
Niklas Keller
46b1a27825 Add garbage collection example with iterators 2018-01-08 21:26:46 +01:00
Markus Staab
34bf671f13 Automatically add \ for buitins (#186)
Fixes #185.
2017-11-29 13:36:50 +01:00
umbri
abe92a78ad Add basic promise examples (#179) 2017-11-08 14:01:26 +01:00
Niklas Keller
19113ed5f1 Add example cross-ref to amphp/socket
amphp/amp is the base library, but people should be aware of the abstractions provided instead of directly using Loop::on* if possible.
2017-10-30 21:56:31 +01:00
Niklas Keller
361b6cefbb Fix code style 2017-09-20 17:50:00 +02:00
Niklas Keller
f2a662534e Improve exception examples 2017-09-20 17:34:20 +02:00
umbri
bb34b9fb2d Added exception examples 2017-09-20 17:26:07 +02:00
Niklas Keller
31f021e59a Add coroutine concurrency example 2017-06-04 16:12:46 +02:00
Niklas Keller
50b37b23ef Add asyncCall 2017-05-03 15:21:49 +02:00
Niklas Keller
3c0d4153c7 🚚 Rename basic examples directory to event-loop 2017-05-02 18:36:02 +02:00
Niklas Keller
1b1ea5688c Add signal and stdin examples 2017-05-02 13:32:58 +02:00
Niklas Keller
2a5600f027 Use asyncCoroutine instead of manual rethrow + new Coroutine 2017-05-02 13:11:52 +02:00
Niklas Keller
c29da96f3e Fix remaining Pause → Delayed in examples and docs 2017-05-02 07:25:22 +02:00
Aaron Piotrowski
da9b724f5b getIterator → iterate 2017-05-02 07:07:43 +02:00
Aaron Piotrowski
45481a710c Squash leftover Stream references 2017-05-02 07:07:33 +02:00
Aaron Piotrowski
0d2095e14d Rename examples directory 2017-05-02 07:07:20 +02:00
Aaron Piotrowski
38d53304ae Stream → Iterator 2017-05-02 07:07:20 +02:00
Aaron Piotrowski
4935dddc84 Refactor Streams
Dropped original Stream interface in favor of the Iterator interface. Eliminates subscriber timing issues and simplifies Stream usage.
2017-05-02 07:04:10 +02:00
Niklas Keller
1286087c06 Rename Pause to Delayed
Pause doesn't cover the delayed value use case.
2017-05-02 07:02:02 +02:00
Niklas Keller
79ab41e5bf Update php-cs-fixer to version 2 and upgrade rules
This also fixes the code style according to the new rules.
2017-04-24 16:22:02 +02:00
Niklas Keller
689502c0ee Apply code style rules also to examples 2017-04-24 15:27:04 +02:00
Niklas Keller
5e545301cd Rename Listener to StreamIterator 2017-04-13 18:20:46 +02:00
Niklas Keller
2aa91a6c25 Rename Stream::listen to Stream::onEmit 2017-03-21 18:29:51 +01:00
Niklas Keller
ce269fa516 Rename Promise::when to Promise::onResolve, resolves #77 2017-03-21 17:23:37 +01:00