1
0
mirror of https://github.com/danog/amp.git synced 2024-12-04 18:38:17 +01:00
Commit Graph

33 Commits

Author SHA1 Message Date
Niklas Keller
05483cdbef
Enforce timer interval as minimum time to execution (#319)
Co-authored-by: Aaron Piotrowski <aaron@trowski.com>
2020-07-14 21:45:35 +02:00
Aaron Piotrowski
a04eda397b
Fix potential warning on shutdown in UvDriver
Like everything shutdown related, this depends on destruction order and appears to only happen on 7.4+.
2020-07-13 10:12:25 -05:00
Niklas Keller
8ee469be90 Improve type definition for Amp\call 2020-04-19 15:38:36 +02:00
Niklas Keller
caea418fe8 Increase psalm error level to level 2 2020-03-28 22:20:44 +01:00
Niklas Keller
0e04422dcb Increase psalm error level to level 4 2020-03-28 20:27:42 +01:00
Niklas Keller
a75164b66b Add psalm static analysis on level 6
This also fixes mixed types in some cases.
2020-03-28 12:23:46 +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
3b12391529
Add note about OR'ing with 4 2018-04-08 13:10:46 -05:00
Aaron Piotrowski
8c8a6da0c2
Invoke watcher callback if events is 0 or 4
4 is UV_DISCONNECT
2018-04-06 14:22:39 -05: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
Bob Weinand
4fe48c8aec Fix #132 (TypeError calling Driver::disable()) 2017-05-19 15:57:49 +02: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
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
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
Niklas Keller
70e63a3748 Fix code style according to new rules 2017-04-24 15:27:04 +02: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
89570e8f6d Move Watcher to Loop namespace 2017-04-18 09:38:16 -05:00
Aaron Piotrowski
97dd8d933e Forward UV error to loop error handler and disable watchers 2017-04-06 11:18:33 -05:00
Niklas Keller
ff5fef4b93 Fix UV executing multiple IO watchers in different ticks, fixes #85 2017-03-25 19:52:17 +01:00
Aaron Piotrowski
a927b3cb06 Separate functions into Promise and Stream namespaces 2017-03-15 19:02:04 -05:00
Aaron Piotrowski
2ab7403ded More code coverage ignores; throw Error instead of DomainException 2017-03-14 11:44:19 -05: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
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
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