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

566 Commits

Author SHA1 Message Date
Aaron Piotrowski
05491a57c9
Optimize fast-finishing/failing coroutines 2017-08-04 22:50:19 -05:00
Niklas Keller
8f5fb52525 Shut up php-cs-fixer
See https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2948.
2017-07-29 23:43:24 +02:00
Bob Weinand
5e93318d85 Fix issue with the loop not terminating with only unreferenced watchers 2017-07-09 09:28:32 +02:00
Aaron Piotrowski
5f3e21a4a4 Add TimeoutCancellationToken 2017-06-13 12:41:47 -05:00
Niklas Keller
c7fcbd96dc Make NullCancellationToken final 2017-06-09 17:22:21 +02:00
Aaron Piotrowski
9757b39fab Use call in LazyPromise and make class final 2017-06-09 10:18:06 -05:00
Aaron Piotrowski
f83d36dfe5 Update promise docblocks 2017-06-06 12:57:03 -05:00
Aaron Piotrowski
7a05fe1316 Use static function for rethrow 2017-06-05 00:21:45 -05:00
Aaron Piotrowski
6ec8757698 Use references instead of function invocation 2017-06-05 00:19:34 -05:00
Aaron Piotrowski
b354b04779 Fix code style 2017-06-05 00:10:13 -05:00
Aaron Piotrowski
02eb0340f1 Use anonymous classes in Deferred and Emitter 2017-06-04 23:59:23 -05:00
Niklas Keller
332869987b Implement NullCancellationToken 2017-05-24 10:34:54 +02:00
Aaron Piotrowski
cd252e4165 Invoke callback on all non-zero statuses 2017-05-24 00:09:04 -05:00
Niklas Keller
ef6c2b10ee Micro-optimize interval = 0 if 2017-05-23 20:17:34 +02:00
Niklas Keller
38ef4d9ffa Fix issues with interval = 0 repeat watchers, fixes #131 2017-05-23 19:46:23 +02:00
Niklas Keller
dbc853c3f1 Fix timers with interval = 0 in NativeDriver 2017-05-22 19:54:14 +02:00
Aaron Piotrowski
5bca41ade4 Cleaner coroutine continuation 2017-05-22 12:28:29 -05:00
Niklas Keller
5dad46f297 Implement additional cancellation token methods 2017-05-22 19:26:09 +02:00
Bob Weinand
7e500548df Merge pull request #133 from amphp/env-driver
Allow setting the loop driver via the env
2017-05-20 18:12:17 +02:00
Bob Weinand
26dfafe00c Avoid coroutine callstack explosion upon yielding succeeded Promises 2017-05-20 16:31:49 +02:00
Niklas Keller
9d18a1f8bd Readd missing depth property 2017-05-20 09:46:01 +02:00
Niklas Keller
e8e26d79e7 Revert "Drop max continuation depth"
This reverts commit cdf28fa938.

As streams always buffer before applying backpressure, these might
result in a stack overflow. Another example is file streaming with
the blocking driver, which always immediately succeeds.
2017-05-20 09:40:56 +02:00
Niklas Keller
e589f2d935 Remove fallback part from error messages 2017-05-19 16:51:20 +02:00
Niklas Keller
28bb6068f1 Allow setting the loop driver via the env 2017-05-19 16:17:11 +02:00
Bob Weinand
4fe48c8aec Fix #132 (TypeError calling Driver::disable()) 2017-05-19 15:57:49 +02:00
Niklas Keller
39dd36efdc Fix cancellation token example 2017-05-16 21:46:52 +02:00
Aaron Piotrowski
be2a9f8c07 Merge pull request #130 from amphp/cancellation
Implement cancellation primitives, resolves #125
2017-05-16 11:32:42 -05:00
Aaron Piotrowski
086f045003 Remove event to stream map
Unnecessary as the watcher object is available in cancel().
2017-05-16 11:22:40 -05:00
Bob Weinand
6e52f3e211 Fix potential issues when operating on destroyed uv handles in shutdown sequence 2017-05-16 18:17:12 +02:00
Aaron Piotrowski
de783b8eb1 Do not call uv_* functions on expired timers 2017-05-15 12:41:43 -05:00
Niklas Keller
61a7596106 Implement cancellation primitives, resolves #125 2017-05-14 23:07:49 +02:00
Aaron Piotrowski
40299959bf Remove calls to uv_close()
Watchers are closed on garabage collection if necessary.
2017-05-13 10:12:03 -05:00
Aaron Piotrowski
51ab8cb134 Only poll again on UV_EAGAIN 2017-05-13 10:11:00 -05:00
Aaron Piotrowski
3f1f9f41ca Do not call uv_close() if other watchers on the same stream exist 2017-05-11 10:39:31 -05:00
Niklas Keller
50b37b23ef Add asyncCall 2017-05-03 15:21:49 +02:00
Niklas Keller
28820fa459 Ignore __destruct for coverage 2017-05-02 19:30:34 +02:00
Niklas Keller
783fe8c4f4 Add asyncCoroutine and ReactPromise tests 2017-05-02 18:59:52 +02:00
Niklas Keller
141875b133 🔥 Kill pipe and capture
Use Amp\call instead.
2017-05-02 18:32:59 +02:00
Aaron Piotrowski
835e617054 More stream → iterator
Hopefully that's all of them…
2017-05-02 07:07:43 +02:00
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
45481a710c Squash leftover Stream references 2017-05-02 07:07:33 +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
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