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
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
fdeb427717
Use simple assignment if queue is empty
...
The common case is for the queue to be empty at the start of the tick, so a call to array_merge() can be avoided in most cases.
2017-04-20 11:26:13 -05: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
97dd8d933e
Forward UV error to loop error handler and disable watchers
2017-04-06 11:18:33 -05:00
Aaron Piotrowski
173549ebba
Halt recursive runs with each call to stop, addresses #84
2017-03-27 11:42:51 -05:00
Niklas Keller
ff5fef4b93
Fix UV executing multiple IO watchers in different ticks, fixes #85
2017-03-25 19:52:17 +01:00
Niklas Keller
a954f73d8e
Update namespacing to be compatible with what's actually used
2017-03-18 21:52:23 +01: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
01c58ae90e
Fix EvDriver with throwing onSignal callback
2017-03-15 08:33:04 +01:00
Niklas Keller
73149b933f
Ignore DriverFactory for code coverage
2017-03-14 22:33:45 +01:00
Niklas Keller
e92bd57030
Remove outdated @throws RuntimeException
2017-03-14 19:05:38 +01:00
Niklas Keller
c13e8e3a66
Use Error instead of InvalidArgumentException, remove test file
2017-03-14 18:44:44 +01:00
Aaron Piotrowski
1dadd4f0da
InvalidWatcherException → InvalidWatcherError
2017-03-14 11:48:27 -05:00
Aaron Piotrowski
2ab7403ded
More code coverage ignores; throw Error instead of DomainException
2017-03-14 11:44:19 -05:00
Niklas Keller
35ac983c53
Add appropriate coverage ignores to Driver.php
2017-03-14 11:01:11 +01: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
Niklas Keller
20acaf123e
Remove unsused code from InvalidWatcherException, add handle tests for drivers
2017-03-13 13:56:46 +01: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
Aaron Piotrowski
a98fe5cdf6
Rethrow React promise rejections
...
Adapt React promises returned from watcher callbacks to promises so that rethrow is called on them.
2017-03-11 09:17:55 -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
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
Niklas Keller
f4f9008ca0
Merge amphp/amp repository into amphp/amp
2017-03-10 18:26:17 +01:00