Niklas Keller
885cd68828
Increase psalm error level to level 3
2020-03-28 21:55:44 +01:00
Niklas Keller
603ce25299
Fix invalid types in doc comments
...
We're on the way to psalm error level 4, but there are still some remaining issues.
2020-03-28 14:32:53 +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
2ac3b550c4
Fix array access on null last error
2020-02-10 12:10:57 -06:00
Aaron Piotrowski
dd4d6be677
Remove unneeded method
...
Fix big-O lies in docblock.
2019-10-31 15:41:07 -05:00
Aaron Piotrowski
710f84ccc8
Improve timer cancellation in NativeDriver
2019-10-30 09:41:46 -05:00
Aaron Piotrowski
ef83723a79
Fix signal handler in NativeDriver when used with pcntl_async_signals
...
Fixes #264 .
2019-02-25 18:05:47 -06:00
Aaron Piotrowski
c6f8425473
Use a custom priority queue for timers
...
Fixes #220 by allowing immediate removal of the watcher from the queue. Insert and extract is O(log(n)), peeking is O(1), and removal is O(n).
2019-01-24 13:09:11 -06:00
Aaron Piotrowski
b6fc1e12d4
Move nowUpdateNeeded setting to getTimeout()
...
Essentially the same fix as @bwoebi committed, just placed at the source of the problem.
2019-01-21 10:27:49 -06:00
Bob Weinand
c3afc5e977
Fix #256 - Ensure nowUpdateNeeded is set to true after a blocking wait in NativeDriver
...
So that expired timeouts also indeed do trigger immediately instead of in the next tick.
2019-01-21 16:41:30 +01:00
Bob Weinand
7075ef7d74
Fix #251 - 100% CPU usage in NativeDriver
...
Also use better bounds for timer - it must not execute before, but may execute a little later (on my system it were up to 7 ms actually)
2018-12-11 11:31:37 +01:00
Niklas Keller
5622edba37
Implement monotonic timer using PHP 7.3's hrtime()
2018-12-10 20:07:11 +01:00
Aaron Piotrowski
5889f4e0fd
Randomize loop now offset
2018-11-26 21:59:15 +01:00
Aaron Piotrowski
77a12c823b
Add Loop::now()
2018-11-26 21:59:15 +01:00
Aaron Piotrowski
c4faf1f347
Update loop time in dispatch() instead of activate()
...
Fixes #243 .
2018-10-14 22:30:31 -05:00
Niklas Keller
fa3fe1d20b
Apply PSR-2
2018-06-18 20:00:01 +02:00
Niklas Keller
a247757535
Ignore only warnings for interrupted syscalls in NativeDriver
...
Fixes #160 .
2017-09-19 18:53:39 +02:00
Niklas Keller
dbc853c3f1
Fix timers with interval = 0 in NativeDriver
2017-05-22 19:54:14 +02:00
Aaron Piotrowski
628d8cbab1
Set next "now" at the beginning of watcher activation
2017-04-20 11:13:17 -05:00
Aaron Piotrowski
4792bf52fe
Emulate "now" behavior of libuv/libev in NativeDriver and EventDriver
...
Timers created while not running when using NativeDriver and EventDriver will include the elapsed time before run() is called. This matches the behavior of EvDriver and UvDriver. Addresses #113 .
2017-04-19 17:21:23 -05:00
Aaron Piotrowski
89570e8f6d
Move Watcher to Loop namespace
2017-04-18 09:38:16 -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
e92bd57030
Remove outdated @throws RuntimeException
2017-03-14 19:05:38 +01: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
766b3224d1
Rename drivers to have a Driver instead of Loop suffix
2017-03-12 11:21:44 +01:00