1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 17:37:50 +01:00
Commit Graph

1553 Commits

Author SHA1 Message Date
Aaron Piotrowski
b757b74c62
Test merge disposal; provide exception to dispose callbacks
Plus some doc updates.
2021-09-04 09:58:01 -05:00
Aaron Piotrowski
41d3c4c177
Loop::queue() instead of defer() 2021-09-03 18:32:23 -05:00
Aaron Piotrowski
de7f7e0b64
Fix some Psalm issues 2021-09-03 18:15:31 -05:00
Aaron Piotrowski
a236223eac
Combine Future/Suspension arrays 2021-09-03 18:00:25 -05:00
Aaron Piotrowski
73fb73614e
Reduce overhead for timeout cancellation tokens 2021-08-30 12:07:07 -05:00
Aaron Piotrowski
eab76ca303
Cancellable joins 2021-08-29 23:28:25 -05:00
Aaron Piotrowski
5b95aa590c
Update for Revolt changes and Future import 2021-08-29 12:18:24 -05:00
Aaron Piotrowski
7e30ee0c2c
Import Future
Co-authored-by: Niklas Keller <me@kelunik.com>
2021-08-29 12:18:05 -05:00
Aaron Piotrowski
09fa422918
Move Pipeline creation
EmitSource::pipe() isn't always used, so the property seems to make more sense in PipelineSource.
2021-04-06 15:38:21 -05:00
Aaron Piotrowski
de1a292903
Use only a single fiber in AsyncGenerator 2021-04-06 11:29:00 -05:00
Niklas Keller
ef23e16c88 Improve composer.json 2021-04-05 21:28:42 +02:00
Aaron Piotrowski
d6abef9100
Update for all() prototype change 2021-04-05 10:02:28 -05:00
Aaron Piotrowski
10817e8522
Rename fail() to error()
Matches Future methods.
2021-04-04 13:31:08 -05:00
Aaron Piotrowski
8043c1e92b
Never throw from AsyncGenerator constructor 2021-04-04 13:29:15 -05:00
Aaron Piotrowski
820bbd2058
Use Revolt Futures, drop Promises 2021-04-04 13:10:23 -05:00
Aaron Piotrowski
56ba17f0ec
Missed this suspension resume/throw 2021-03-28 22:32:58 -05:00
Aaron Piotrowski
2f658986f9
Async resume done by Suspension now 2021-03-28 22:23:53 -05:00
Aaron Piotrowski
d2a5f7e9df
Use Suspension instead of promises in EmitSource 2021-03-28 12:39:11 -05:00
Niklas Keller
9a568b133f Use microtasks for promise callbacks 2021-03-27 16:23:32 +01:00
Niklas Keller
2f778fe069 Use revolt
Removes deprecated APIs.
2021-03-26 22:34:32 +01:00
Aaron Piotrowski
8892b619a5
Remove another leftover
Forgot this when FiberScheduler was dropped.
2021-03-14 13:16:53 -05:00
Aaron Piotrowski
41b9af525d
Move loop fiber storage to Loop 2021-02-19 11:38:59 -06:00
Aaron Piotrowski
99e765a8be
Update promise docs and await() 2021-02-18 09:56:26 -06:00
Aaron Piotrowski
b0b9489a2c
Cleanup await() 2021-02-12 14:19:39 -06:00
Aaron Piotrowski
4290bd7e28
Update to simpler ext-fiber API 2021-02-11 23:02:31 -06:00
Eugene Leonovich
e2d9ebefb0
Fix TypeError in EventDriver (#339) 2021-01-09 22:24:36 -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
f02dbc8585
Update for FiberScheduler changes 2021-01-04 13:57:33 -06:00
Aaron Piotrowski
ae93b4cf21
Rename Signal to SignalTrap
Also renamed Amp\signal() to trap(), a nice analog to bash’s trap.
2020-12-27 16:31:45 -06:00
Aaron Piotrowski
80ea42bdcf
Update for Fiber constructor change 2020-12-15 22:17:49 -06:00
Aaron Piotrowski
7c7e0ea554
Rename Loop::get() to Loop::getDriver()
Also Loop::set() to Loop::setDriver().
2020-12-12 12:15:18 -06:00
Aaron Piotrowski
ee8343e566
Update for ext-fiber suspend API change 2020-12-09 11:22:47 -06:00
Aaron Piotrowski
0f2cf56142
Missed a static
Not really necessary here, but we use it everywhere else.
2020-11-29 22:38:58 -06:00
Aaron Piotrowski
8865458454
throw is now an expression! 2020-11-29 22:36:55 -06:00
Aaron Piotrowski
b95048abd9
Avoid unnecessary promise object 2020-11-29 22:35:26 -06:00
Aaron Piotrowski
74a24b36df
Rearrange EmitSouce::push() 2020-11-29 00:04:42 -06:00
Aaron Piotrowski
0c031e7c90
Reduce nesting 2020-11-28 23:31:27 -06:00
Aaron Piotrowski
a673c80fde
Fix active watchers in some tests 2020-11-21 00:18:36 -06:00
Aaron Piotrowski
051320a30f
Update for ext-fiber changes 2020-11-21 00:18:14 -06:00
Aaron Piotrowski
73bf4c35b9
Minor optimization to consuming values 2020-11-18 12:35:52 -06:00
Aaron Piotrowski
f7f37aa86e
Avoid creating unnecessary promise objects
If backpressure is always awaited, this avoids creating promises.
2020-11-17 17:28:28 -06:00
Aaron Piotrowski
014adbd89e
Fix emit after disposal 2020-11-16 17:20:13 -06:00
Aaron Piotrowski
31adf876b6
Merge branch 'master' into v3
# Conflicts:
#	lib/Loop/Internal/TimerQueue.php
#	lib/Loop/Internal/TimerQueueEntry.php
2020-11-14 10:52:36 -06:00
Aaron Piotrowski
dbb3c28ece
Remove TimerQueueEntry
Unnecessary now that Watchers have an expiration property.
2020-11-14 10:44:06 -06:00
Aaron Piotrowski
a2a78939b9
Use Traversable as return type
Reduces the likelihood of using next()/current() concurrently.
2020-11-10 21:56:00 -06:00
Aaron Piotrowski
791885592e
Remove unnecessary indirection
Also updated some psalm params and returns.
2020-11-10 13:28:43 -06: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
6d5e0f5ff7
More direct use of fiber
Avoids creating unnecessary promise objects.

delay(0) ticking the loop only once required using delay(x) instead of delay(0) in some tests.
2020-11-05 23:55:06 -06:00
Aaron Piotrowski
f3b189f33f
Update for Continuation 2020-11-05 11:29:31 -06:00