1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 04:24:42 +01:00
Commit Graph

1070 Commits

Author SHA1 Message Date
Aaron Piotrowski
da9b724f5b getIterator → iterate 2017-05-02 07:07:43 +02:00
Aaron Piotrowski
91c8da9fec Replace more occurrences of stream 2017-05-02 07:07:43 +02:00
Aaron Piotrowski
f78328822c Allow for debugging of double iterator completion 2017-05-02 07:07:43 +02:00
Aaron Piotrowski
8ccb0643c1 Fail tests if exception is not thrown from advance() 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
9a2a4966c6 Fix code style issues 2017-05-02 07:07:20 +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
4992d3ebac Update stream tests 2017-05-02 07:06:20 +02:00
Aaron Piotrowski
a096a36f9a Emitter::resolve → Emitter::complete 2017-05-02 07:04:30 +02:00
Aaron Piotrowski
7e6eb3689e Update stream functions 2017-05-02 07:04:30 +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
cc32620f5c Fix phpcov executable 2017-04-26 22:30:44 +02:00
Niklas Keller
17224616aa Add more grace periods for timing dependent tests 2017-04-26 21:37:09 +02:00
Niklas Keller
34d4206e8f Fix coverage merge executable 2017-04-26 21:23:45 +02:00
Niklas Keller
431212989a Remove incompatible wget option 2017-04-26 20:55:04 +02:00
Niklas Keller
2ec682b1c2 Exclude memoryleak group for uv tests 2017-04-26 20:52:08 +02:00
Niklas Keller
d9b36b940d Ignore platform requirements for php-coveralls as well 2017-04-26 20:46:42 +02:00
Niklas Keller
592ca615b4 Move coverage tool installation to install step to benefit from caching 2017-04-26 20:41:10 +02:00
Niklas Keller
37026dbaae Put memory leak tests into a group to enable skipping
Also fixes the missing directory on Travis.
2017-04-26 20:27:59 +02:00
Niklas Keller
136ccc7dad Run UV tests in a separate PHP instance 2017-04-26 20:20:08 +02:00
Niklas Keller
b674bb994a Add PHP_CS_FIXER_IGNORE_ENV for running php-cs-fixer on PHP 7.2 2017-04-26 09:59:54 +02:00
Aaron Piotrowski
8ca8009074 Remove note about yielding in finally
Yielding in finally will work as long as the generator is not force closed (for example, a yielded promise is never resolved and the coroutine object is subsequently destroyed).
2017-04-25 14:29:10 -05:00
Aaron Piotrowski
45476b76a4 Reuse watcher resources when possible
Previously, disabling the sole read or write watcher for a stream would result in a duplicate UV-watcher for that stream being created. This keeps track of which UV-watchers are associated with a stream until the watcher is cancelled (not just disabled).
2017-04-24 19:19:22 -05:00
Aaron Piotrowski
e1491b1925 Handle invalid yield like a failed promise 2017-04-24 13:08:30 -05:00
Niklas Keller
14d6b45b0a --ignore-platform-reqs on Travis because php-cs-fixer
See https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/2722.
2017-04-24 18:59:55 +02:00
Aaron Piotrowski
34192ceca5 Drop Coroutine::dispose() 2017-04-24 11:10:05 -05:00
Niklas Keller
c3fc6659cd Revert to assertEquals where order might be different, remove strict rule 2017-04-24 16:28:56 +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
0e376fbed9 Increase variation grace period in tests 2017-04-24 15:27:04 +02:00
Niklas Keller
e9d48a68d5 Rename createRunnable to asyncCoroutine and createCallable to coroutine 2017-04-24 15:27:04 +02:00
Niklas Keller
05670678e1 Fix tests regarding UnionTypeError 2017-04-24 15:27:04 +02:00
Niklas Keller
dc21d094c5 Throw error in case the loop throws during wait 2017-04-24 15:27:04 +02:00
Niklas Keller
e1c63c62f4 Minor documentation changes 2017-04-24 15:27:04 +02:00
Niklas Keller
65a37484a2 Replace UnionTypeError with factory function + minor doc changes 2017-04-24 15:27:04 +02:00
Niklas Keller
689502c0ee Apply code style rules also to examples 2017-04-24 15:27:04 +02:00
Niklas Keller
ccee13bd0b Make travis scripts executable 2017-04-24 15:27:04 +02:00
Niklas Keller
70e63a3748 Fix code style according to new rules 2017-04-24 15:27:04 +02:00
Niklas Keller
b686f2ac8c Use external scripts to install extensions for reusability 2017-04-24 15:27:04 +02:00
Niklas Keller
cf535cfe70 Add additional code fixers 2017-04-24 15:27:04 +02:00
Niklas Keller
dfa40f5b00 Rename wrap to createRunnable and coroutine to createCallable 2017-04-24 15:27:04 +02:00
Niklas Keller
4577f92625 Remove unnecessary usages of Amp\wrap 2017-04-24 15:27:04 +02:00
Niklas Keller
4f8b656513 Document wrap and coroutine better by explicitly naming the differences 2017-04-24 15:27:04 +02:00
Aaron Piotrowski
e75c62a5fd Do not depend on watcher execution order
Loop driver spec says order is not guaranteed.
2017-04-21 12:18:40 -05:00
Aaron Piotrowski
a562d6b20f Use same poll for read and write watchers
Changed values of Watcher constants to match UV constants because it was easier that way. :-D
2017-04-21 10:54:53 -05:00
Aaron Piotrowski
6375d0881d Use same FD for read and write 2017-04-21 10:08:58 -05:00
Aaron Piotrowski
ef51893b69 Test multiple watchers on same FD 2017-04-21 10:02:10 -05:00
Aaron Piotrowski
fdeb427717 Use simple assignment if queue is empty
The common case is for the queue to be empty at the start of the tick, so a call to array_merge() can be avoided in most cases.
2017-04-20 11:26:13 -05:00
Aaron Piotrowski
628d8cbab1 Set next "now" at the beginning of watcher activation 2017-04-20 11:13:17 -05:00