Aaron Piotrowski
f02dbc8585
Update for FiberScheduler changes
2021-01-04 13:57:33 -06:00
Aaron Piotrowski
8d8358023f
Merge branch 'master' into v3
2020-11-03 17:29:41 -06:00
descawed
ecdc3c476b
Correct heap implementation in TimerQueue ( #332 )
...
* Correct heap implementation in TimerQueue, which would sometimes extract timers in the wrong order after a node other than the root was removed
* Factor out old heap rebuilding code into its own method to satisfy codeclimate requirements
2020-11-03 10:23:45 -06:00
Aaron Piotrowski
eaa7c45049
Make Driver an interface
2020-11-01 09:43:21 -06:00
Aaron Piotrowski
ee3c09087b
Merge branch 'master' into v3
2020-10-10 08:57:34 -05:00
Aaron Piotrowski
eb2f325586
Fix NativeDriver when only signals are enabled
2020-10-10 08:54:50 -05:00
Aaron Piotrowski
249aa95256
Forbid loop nesting
2020-10-03 09:42:29 -05: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
4c8cd6b7b1
Revert DriverControl
...
Simplifies fiber running the loop. Control complexity seems unnecessary now since the loop should not need to be started by the user.
2020-10-02 22:26:10 -05:00
Aaron Piotrowski
27a8facd6a
Update tests for fibers
2020-10-02 13:40:29 -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
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
Niklas Keller
5a294f1381
Fix TracingDriver, add TracingDriverTest
2019-10-01 21:39:23 +02: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
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
Aaron Piotrowski
77a12c823b
Add Loop::now()
2018-11-26 21:59:15 +01:00
Gabriel Caruso
6be5d4bfc5
Use dedicated PHPUnit assertions
2018-11-14 22:14:22 +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
98cfaa63ca
Remove unused variables
2017-12-05 08:48:56 +01:00
Markus Staab
34bf671f13
Automatically add \ for buitins ( #186 )
...
Fixes #185 .
2017-11-29 13:36:50 +01:00
Niklas Keller
bd428ca31b
Fix DriverTest::testBug163ConsecutiveDelayed to use assigned driver
2017-09-19 19:58:07 +02:00
Niklas Keller
7a04dc5c21
Fix EventDriver warnings and bugs
...
Fixes #163 , #159 .
2017-09-17 12:18:04 +02:00
Niklas Keller
36794da8e9
Fix code style
2017-07-09 14:17:47 +02:00
Bob Weinand
5e93318d85
Fix issue with the loop not terminating with only unreferenced watchers
2017-07-09 09:28:32 +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
Niklas Keller
a289e7e41d
Increase testNestedLoopSignalDispatch timeouts
2017-05-19 16:47:55 +02:00
Niklas Keller
fdf18dedd7
Fix tabs → spaces
2017-05-16 20:08:27 +02:00
Bob Weinand
6e52f3e211
Fix potential issues when operating on destroyed uv handles in shutdown sequence
2017-05-16 18:17:12 +02:00
Bob Weinand
f063a8311a
Shutup "style" checker....
2017-05-07 19:14:13 +02:00
Bob Weinand
6c03950abd
Do not run uv tests separately in its own process
2017-05-07 19:02:22 +02:00
Bob Weinand
55de30c53d
Properly run gc_collect_cycles() between tests
...
This avoids leaking file descriptors with Uv
2017-05-07 13:09:59 +02:00
Niklas Keller
5c81015ddb
Increase repeat watcher to make test failure more unlikely
2017-05-03 22:21:57 +02:00
Niklas Keller
def42c496a
Fix code style
2017-05-02 22:09:11 +02:00
Niklas Keller
5471b17a67
Fix broken test
2017-05-02 21:57:00 +02:00
Niklas Keller
8d9219bf92
Increase timer delay and defer in testMultipleWatchersOnSameDescriptor
2017-05-02 21:51:52 +02:00
Niklas Keller
e00ab0db75
Wrap execution order test in extra defer
...
This should mitigate the EventDriverTest occassionally failing.
In case this doesn't help, increase the rep1 repeat timer interval.
2017-05-02 21:42:45 +02:00
Niklas Keller
17224616aa
Add more grace periods for timing dependent tests
2017-04-26 21:37:09 +02:00
Niklas Keller
37026dbaae
Put memory leak tests into a group to enable skipping
...
Also fixes the missing directory on Travis.
2017-04-26 20:27:59 +02:00
Niklas Keller
136ccc7dad
Run UV tests in a separate PHP instance
2017-04-26 20:20:08 +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
0e376fbed9
Increase variation grace period in tests
2017-04-24 15:27:04 +02:00
Niklas Keller
70e63a3748
Fix code style according to new rules
2017-04-24 15:27:04 +02:00
Aaron Piotrowski
e75c62a5fd
Do not depend on watcher execution order
...
Loop driver spec says order is not guaranteed.
2017-04-21 12:18:40 -05:00
Aaron Piotrowski
6375d0881d
Use same FD for read and write
2017-04-21 10:08:58 -05:00
Aaron Piotrowski
ef51893b69
Test multiple watchers on same FD
2017-04-21 10:02:10 -05:00
Aaron Piotrowski
76e0913d9b
Fix timer test comment
...
The concept of time continues to elude me…
2017-04-20 10:00:57 -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
173549ebba
Halt recursive runs with each call to stop, addresses #84
2017-03-27 11:42:51 -05:00