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

495 Commits

Author SHA1 Message Date
Niklas Keller
3e8b37f21f Remove Amp\Stream\interval and add delay option to fromIterable 2017-04-13 18:05:41 +02:00
Niklas Keller
b810ff1034 Use eval to prevent multiple definitions warnings for Emitter and Deferred 2017-04-13 18:04:51 +02:00
Aaron Piotrowski
a0b8de40fb Null deferred refs 2017-04-07 12:50:01 -05:00
Bob Weinand
f100d9cd8b Fix possible double resolutions 2017-04-07 18:47:44 +02:00
Bob Weinand
c52279065d Remove unnecessary use of temporary variables 2017-04-07 18:09:39 +02:00
Aaron Piotrowski
e43f9afc8f Refactor functions to remove circular refs
This will provide for faster garbage collection of unused promises/deferreds/etc.
2017-04-07 10:51:57 -05:00
Aaron Piotrowski
97dd8d933e Forward UV error to loop error handler and disable watchers 2017-04-06 11:18:33 -05:00
Aaron Piotrowski
d01ee68dd2 Null circular reference on resolution 2017-04-06 09:24:21 -05:00
Aaron Piotrowski
cdf28fa938 Drop max continuation depth
It seems unlikely a real-world application would run out of memory due to call stack depth for normal coroutine continuations (that is, where infinite recursion is not root problem). Hopefully time will not prove me wrong…
2017-03-30 23:45:54 -05:00
Niklas Keller
8caae2253f Allow recording stacktraces to debug double resolution 2017-03-29 17:25:44 +02:00
Aaron Piotrowski
2f7e9a0746 Run returned generator as coroutine from onResolve and onEmit callbacks 2017-03-27 18:37:55 -05:00
Aaron Piotrowski
173549ebba Halt recursive runs with each call to stop, addresses #84 2017-03-27 11:42:51 -05:00
Aaron Piotrowski
cb717952f1 Validate number of required promises 2017-03-27 11:42:11 -05:00
Aaron Piotrowski
c464e070e4 s/fail/succeed 2017-03-26 12:53:26 -05:00
Aaron Piotrowski
67f9f4a569 Drop lift and Promise\map; add required param to Promise\some 2017-03-26 12:34:34 -05:00
Niklas Keller
ff5fef4b93 Fix UV executing multiple IO watchers in different ticks, fixes #85 2017-03-25 19:52:17 +01: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
Niklas Keller
a954f73d8e Update namespacing to be compatible with what's actually used 2017-03-18 21:52:23 +01:00
Aaron Piotrowski
39b95255d2 Reduce code duplication in Coroutine
Hot path is still duplicated for performance, but conversion of non-promise values to promises should be a single method.
2017-03-15 19:10:23 -05:00
Aaron Piotrowski
86b494a5c4 Throw Error if registering signal handler fails 2017-03-15 19:08:00 -05:00
Aaron Piotrowski
a927b3cb06 Separate functions into Promise and Stream namespaces 2017-03-15 19:02:04 -05:00
Niklas Keller
ea67e113b2 Add test for loop accessor 2017-03-15 08:40:58 +01:00
Niklas Keller
01c58ae90e Fix EvDriver with throwing onSignal callback 2017-03-15 08:33:04 +01:00
Niklas Keller
73149b933f Ignore DriverFactory for code coverage 2017-03-14 22:33:45 +01:00
Aaron Piotrowski
6b9ec609c1 Add UnionTypeError 2017-03-14 13:15:31 -05:00
Aaron Piotrowski
44c5a1b1dc Cleanup React promise adaption 2017-03-14 13:15:31 -05:00
Niklas Keller
e92bd57030 Remove outdated @throws RuntimeException 2017-03-14 19:05:38 +01:00
Niklas Keller
c13e8e3a66 Use Error instead of InvalidArgumentException, remove test file 2017-03-14 18:44:44 +01:00
Niklas Keller
ee11b70395 Fix remaining InvalidWatcherError renames 2017-03-14 18:24:14 +01:00
Aaron Piotrowski
1dadd4f0da InvalidWatcherException → InvalidWatcherError 2017-03-14 11:48:27 -05:00
Aaron Piotrowski
2ab7403ded More code coverage ignores; throw Error instead of DomainException 2017-03-14 11:44:19 -05:00
Niklas Keller
35ac983c53 Add appropriate coverage ignores to Driver.php 2017-03-14 11:01:11 +01:00
Aaron Piotrowski
d7353d4d8f Catch watcher callback exceptions individually
Exceptions thrown from watcher callbacks are now forwarded to the loop error handler without ending the current tick. Fixes #74.
2017-03-14 00:20:05 -05:00
Niklas Keller
20acaf123e Remove unsused code from InvalidWatcherException, add handle tests for drivers 2017-03-13 13:56:46 +01:00
Aaron Piotrowski
f187d4b31a Accept React promises in rethrow, wait, timeout, pipe, and capture
Fixes #75.
2017-03-13 07:17:06 +01:00
Aaron Piotrowski
8b7fb9ece3 Merge pull request #72 from amphp/issue-68
Implement yielding arrays as implicit all operator
2017-03-12 22:45:31 -05:00
Niklas Keller
77bd05b807 Fix tests and Producer React adaption 2017-03-12 22:09:19 +01:00
Niklas Keller
0006c6cb56 Fix async-interop docblock leftover 2017-03-12 21:39:17 +01:00
Niklas Keller
e8ea4e2ba9 Implement yielding arrays as implicit all operator, fixes #68 2017-03-12 19:42:25 +01:00
Aaron Piotrowski
2cc4cf9d0b Fix use statement order 2017-03-12 12:23:48 -05:00
Aaron Piotrowski
f040e8801e Fast return on void watcher callback 2017-03-12 12:23:27 -05:00
Aaron Piotrowski
cd4328ab48 Merge branch 'react-compatibility' 2017-03-12 11:38:48 -05:00
Pieter Hordijk
2db7bed1b6 Fixed typos an promise -> a promise 2017-03-12 17:36:07 +01:00
Niklas Keller
d748855a51 Fix some risky tests 2017-03-12 17:33:46 +01:00
Niklas Keller
f5f9410ec0 Rename Factory to DriverFactory, rename supported to isSupported 2017-03-12 11:25:21 +01:00
Niklas Keller
766b3224d1 Rename drivers to have a Driver instead of Loop suffix 2017-03-12 11:21:44 +01:00
Aaron Piotrowski
a98fe5cdf6 Rethrow React promise rejections
Adapt React promises returned from watcher callbacks to promises so that rethrow is called on them.
2017-03-11 09:17:55 -06:00
Aaron Piotrowski
7ad10f5d7d Add support for React promises 2017-03-11 09:17:43 -06:00
Aaron Piotrowski
7ebe70e0ae Fix docblock param formatting
Callable prototypes make alignment a mess… maybe something better can be done.
2017-03-10 23:08:40 -06:00