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

45 Commits

Author SHA1 Message Date
Aaron Piotrowski
4290bd7e28
Update to simpler ext-fiber API 2021-02-11 23:02:31 -06:00
Aaron Piotrowski
f02dbc8585
Update for FiberScheduler changes 2021-01-04 13:57:33 -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
eaa7c45049
Make Driver an interface 2020-11-01 09:43:21 -06:00
Aaron Piotrowski
45bd189e76
Add Driver::clear()
Intended for tests over swapping the entire event loop.

This allows forbidding swapping the global event loop once it is started.
2020-10-03 08:38:31 -05:00
Aaron Piotrowski
0933a501fd
Remove unnecessary version checks 2020-10-02 13:56:17 -05:00
Aaron Piotrowski
32c2cd6d64
Drop Loop::run() and Loop::stop()
This is a *huge* shift, but there’s no reason for these to exist in a world with top-level await.
2020-09-27 09:38:52 -05:00
Aaron Piotrowski
9f68bd4046
Remove Driver::run() and stop()
Added Driver::isRunning().

Driver now must be started and stopped through an instance of DriverControl.
2020-09-26 12:50:30 -05:00
Aaron Piotrowski
d48e6bd5d2
Add more class and return types
More PHP 7.1 to 8 types added.
2020-09-24 22:17:13 -05:00
Aaron Piotrowski
5f6db028ab
Initial fiber support 2020-09-24 12:53:32 -05:00
Niklas Keller
caea418fe8 Increase psalm error level to level 2 2020-03-28 22:20:44 +01:00
Aaron Piotrowski
77a12c823b Add Loop::now() 2018-11-26 21:59:15 +01:00
Niklas Keller
fa3fe1d20b Apply PSR-2 2018-06-18 20:00:01 +02:00
Aaron Piotrowski
242d78a6ec Fix 212 and ignore unreference on invalid watchers (#216)
Fix #212 & Ignore unreference on invalid watchers
2018-04-12 09:46:52 +02:00
Niklas Keller
df15b07fb3 Replace driver with dummy driver and collect cycles on loop switch
This solves https://github.com/amphp/dns/issues/66. Circular references might otherwise be collected later and __destruct operations using the Loop accessor might cancel watchers on the wrong loop.
2017-10-08 12:52:30 +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
5e545301cd Rename Listener to StreamIterator 2017-04-13 18:20:46 +02:00
Niklas Keller
a954f73d8e Update namespacing to be compatible with what's actually used 2017-03-18 21:52:23 +01:00
Niklas Keller
ea67e113b2 Add test for loop accessor 2017-03-15 08:40:58 +01:00
Niklas Keller
ee11b70395 Fix remaining InvalidWatcherError renames 2017-03-14 18:24:14 +01:00
Niklas Keller
f5f9410ec0 Rename Factory to DriverFactory, rename supported to isSupported 2017-03-12 11:25:21 +01: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
Aaron Piotrowski
85de9f1f1e Remove missed wrap call 2017-03-10 16:23:29 -06:00
Aaron Piotrowski
1fea860a05 Run watcher callbacks as coroutines within drivers 2017-03-10 16:03:41 -06:00
Aaron Piotrowski
ca30af4d22 More type declarations in loop component 2017-03-10 15:46:12 -06:00
Aaron Piotrowski
1929715b97 Remove driver nullability 2017-03-10 15:34:52 -06:00
Aaron Piotrowski
754a29e86c Remove promise error handler
Exceptions thrown from when callbacks are now forwarded directly to the loop error handler.
2017-03-10 15:32:58 -06:00
Niklas Keller
be34c49a2d Fixup all remaining issues, tests pass locally 2017-03-10 22:20:28 +01:00
Niklas Keller
0be9ae9ade Switch from AsyncInterop\Promise to Amp\Promise 2017-03-10 21:58:46 +01:00
Niklas Keller
e64bbfb9f5 Add Loop::set, auto-wrapping, fixup things 2017-03-10 21:31:57 +01:00
Niklas Keller
21561661a2 Fixup after repository merge 2017-03-10 19:19:32 +01:00
Aaron Piotrowski
9073f6c999 Docblock cleanup 2017-02-16 22:36:32 -06:00
Aaron Piotrowski
d7e8a9de84 Calling stop() in nested loop should not stop outer loop 2017-02-16 22:20:10 -06:00
Niklas Keller
a69bf4d3a0 Improve type hints / types 2017-01-16 17:39:24 +01:00
Niklas Keller
6312ac15aa Fix invalid watcher exception construction 2017-01-11 14:28:27 +01:00
Niklas Keller
568183b261 Update to event-loop 0.5.0 2017-01-07 13:45:03 +01:00
Aaron Piotrowski
e169bb649c Remove unnecessary temp variable 2017-01-06 10:21:58 -06:00
Aaron Piotrowski
fbdc611e44 Activate watchers at begging of tick instead of end 2017-01-06 10:15:54 -06:00
Aaron Piotrowski
06e50bdb88 Fix docblock 2017-01-05 12:39:34 -06:00
Aaron Piotrowski
b535a72161 Update for loop standard changes 2016-12-28 23:11:08 -06:00
Bob Weinand
7e875298b8 Use getInfo() in __debugInfo() 2016-12-29 01:50:41 +01:00
Bob Weinand
ef9216a00a Do not block in Loop::dispatch() after Loop::stop() 2016-12-18 21:56:47 +01:00
Aaron Piotrowski
973a08c26b Update for loop standard v0.3 2016-09-09 17:38:22 -05:00
Aaron Piotrowski
ea66677a50 Update for Driver changes in spec 2016-08-06 08:58:37 -05:00
Aaron Piotrowski
a49d333f1b Add EvLoop; Split shared components into Loop 2016-06-08 09:22:14 -05:00