Niklas Keller
32441396c5
Merge pull request #100 from async-interop/clarify_readable_writable_closed
...
Clarify that (half-)closed streams also trigger the respective read and write watchers
2016-09-24 21:11:17 +02:00
Bob Weinand
74ff6a4be1
Clarify that (half-)closed streams also trigger the respective read and write watchers
2016-09-23 16:02:23 +02:00
Niklas Keller
3791a7536a
Add missing documentation
2016-09-22 09:15:45 +02:00
Bob Weinand
a31f5188cc
Merge pull request #97 from async-interop/issue-93
...
Change exception base classes to Exception
2016-09-21 21:29:32 +02:00
Niklas Keller
3228677953
Change exception base classes to Exception
...
Resolves #93 .
2016-09-21 18:05:59 +02:00
Aaron Piotrowski
9ab9e6a6bb
Merge pull request #91 from async-interop/disabling_invalid_watcher
...
Allow disabling of invalid watchers
2016-08-30 15:35:31 -05:00
Bob Weinand
b3fdfa4ede
Fixed #90 - allow disabling of invalid watchers
2016-08-30 22:04:21 +02:00
Bob Weinand
dff456ce83
Merge pull request #89 from async-interop/state
...
Rename fetch/storeState to get/setState
2016-08-10 12:18:56 +01:00
Niklas Keller
74e2577b25
Rename fetch/storeState to get/setState
2016-08-06 14:49:08 +02:00
Cees-Jan Kiewiet
4bdc40e9c1
Merge pull request #87 from async-interop/driver-registry-merge
...
Merge Registry into Driver
2016-08-06 14:31:44 +02:00
Niklas Keller
8ece6be6cf
Make final PSR-2 compatible
2016-08-05 14:11:59 +02:00
Niklas Keller
39b7ddd366
Make abstract PSR-2 compatible
2016-08-05 13:56:26 +02:00
Niklas Keller
6cde9f5495
Merge Registry into Driver
2016-08-04 21:08:52 +02:00
Cees-Jan Kiewiet
6b1da28fb8
Merge pull request #84 from async-interop/signal_handlers_in_different_loops
...
Add a warning/implementation note about installing handlers for a same signal on different loops
2016-07-30 20:50:01 +02:00
Bob Weinand
9f3f6b9523
Add a warning/implementation note about installing handlers for a same signal on different loops
...
This needs to be undefined behavior as we do not have the possibilities in PHP (i.e. the language and functions don't give us the power) to distinguish properly whether a signal is already installed or not
Also, when we try to set a handler for a signal we've already installed a signal elsewhere, the second onSignal() call will lead implementations to override the original handler (on the system level, with signal()/sigaction())
Ultimately some extensions just flat out emit a warning in that case (e.g. libev).
Thus, we cannot control what happens and hence this needs to be specified as undefined behavior.
2016-07-19 18:10:51 +02:00
Niklas Keller
8f38808ddb
Fix line lengths, resolves #76 ( #81 )
2016-07-15 22:17:24 +02:00
Bob Weinand
e089d8e267
Add line break to prevent overlong line
2016-06-26 17:19:54 +02:00
Aaron Piotrowski
8c9efe42aa
Undefined callback order ( #80 )
2016-06-26 16:15:01 +02:00
Aaron Piotrowski
b0435d221f
Merge pull request #78 from async-interop/watcher-activation
...
Specify when exactly a watchers callbacks may start to be called
2016-06-21 14:02:28 -05:00
Bob Weinand
7b30e788bb
Specify when exactly a watchers callbacks may start to be called
...
Delaying activation of watchers to the next tick guarantees consistent behavior between all implementations.
Additionally it eliminates the following problem:
- Two defer()'s are set up with the first one immediately disabled
- Second defer()'s callback is called and enables the first defer()'s watcher
- Executes defer() in same tick or next tick?
If the answer is same tick, what happens in the following scenario:
- An immediately disabled defer() and a delay($msDelay = 0) are set up
- The delay()'s callback enables the defer()'s watcher
- Executes defer() callback in same tick or next tick?
Doing it in same tick violates the requirement that defers are called before any other watchers in the same tick.
We get similar problems with e.g. delay() and repeat() (if their timer all expired now, but we require order to be preserved).
Thus we need to pretty much delay the activation of enable() to the next tick to avoid potential ambiguity or different behaviors depending on when exactly the enable() or watcher registration happened.
2016-06-07 21:17:27 +02:00
Bob Weinand
1e584697b3
Be a little more specific about enable/definition
...
Enable is when things get put back to the queue, hence that order shall be respected. Otherwise we get undefined behaviors when disabling deferreds which have yet to be executed and re-enabling them after the point they should have been executed.
2016-06-07 01:44:28 +02:00
Andrew Carter
ccb2180184
Clarified that cancel() can be used to prevent a memory leak ( #75 )
2016-06-06 22:37:17 +02:00
Aaron Piotrowski
289b0fe603
Merge pull request #74 from async-interop/calltime_guarantees
...
Specify exact guarantees when a callback has to be called
2016-06-05 22:45:14 -05:00
Aaron Piotrowski
c05ba0daa9
Merge pull request #72 from async-interop/invalid-watcher-handling
...
(Re-)Introduce InvalidWatcherException
2016-06-05 22:44:42 -05:00
Aaron Piotrowski
d29e175189
Merge pull request #71 from async-interop/defer-delay-invalidation-note
...
Add the invalidation note on defer/delay
2016-06-05 22:44:20 -05:00
Bob Weinand
cf012501a2
Specify exact guarantees when a callback has to be called
...
This prevents unexpected failures due to different execution orders in different implementations.
2016-06-04 20:28:25 +02:00
Bob Weinand
f6c6f41adf
(Re-)Introduce InvalidWatcherException
...
Fixes #58
2016-06-02 21:56:36 +02:00
Bob Weinand
7cd03f3927
The watcher id must be invalidated before defer and delay callback calls
...
Fixes #70 .
2016-06-02 19:15:52 +02:00
Aaron Piotrowski
ae441eb179
Fix DummyDriver
...
Conflict due to merge of #68
2016-05-31 10:08:10 -05:00
Aaron Piotrowski
5a82cd9b6b
Merge pull request #67 from async-interop/defer-callback
...
Put Loop::execute() $callback into Driver::defer()
2016-05-31 10:00:11 -05:00
Aaron Piotrowski
3b338b5800
Merge pull request #65 from async-interop/lazy-fast-loop
...
Lazy factory instantiation and save method call
2016-05-31 09:57:18 -05:00
Bob Weinand
a503b8598d
Lazy factory instantiation and save method call
2016-05-31 14:50:33 +02:00
Bob Weinand
1c30c349c4
Merge pull request #68 from async-interop/driver-registry
...
Driver registry
2016-05-31 14:46:57 +02:00
Aaron Piotrowski
237a9c45ad
Update registry test
2016-05-27 11:38:19 -05:00
Aaron Piotrowski
4908813e08
Refactor Registry for Drivers
2016-05-27 10:45:45 -05:00
Bob Weinand
104b761e59
Revert "Merge pull request #63 from async-interop/throw-on-invalid-watcher"
...
This reverts commit 5bd7794dfa
, reversing
changes made to 64494951ff
.
Revert too quick merge (sorry) as per #58
2016-05-27 14:57:11 +02:00
Bob Weinand
5bd7794dfa
Merge pull request #63 from async-interop/throw-on-invalid-watcher
...
Throw on invalid watcher identifier
2016-05-27 03:24:00 +02:00
Bob Weinand
b197b2c07d
Put Loop::execute() $callback into Driver::defer()
...
This also ensures that potential throwing in the callback will be handled inside a potential error handler instead of immediately falling through.
2016-05-26 23:45:27 +02:00
Aaron Piotrowski
b8f0d521ba
Add note that disable must not invalidate
2016-05-26 12:36:56 -05:00
Aaron Piotrowski
b7ed0afd02
Add "or cancelled" to throw condition
2016-05-26 11:10:44 -05:00
Aaron Piotrowski
61c13e209f
Extend LogicException instead
2016-05-26 11:07:42 -05:00
Aaron Piotrowski
7c34146ac8
Add InvalidWatcherException
2016-05-26 10:43:03 -05:00
Aaron Piotrowski
64494951ff
use -> namespace
2016-05-26 10:40:50 -05:00
Bob Weinand
6c8d31bc8a
Merge pull request #62 from async-interop/cleanup-namespace
...
Cleanup namespace
2016-05-26 17:27:23 +02:00
Aaron Piotrowski
7a2c5cdc88
Cleanup namespace
2016-05-26 10:05:17 -05:00
Aaron Piotrowski
12102e773a
Merge pull request #59 from async-interop/fix-running
...
Fix running flag, factory reset, etc.
2016-05-26 09:44:41 -05:00
Niklas Keller
52a13b69dd
Fix se stupid composer
2016-05-25 13:55:36 +02:00
Niklas Keller
47edee535d
Forbid new factories while running, add scope test
2016-05-25 13:55:36 +02:00
Niklas Keller
476bb2305b
Fix loop running flag to support nesting properly
2016-05-25 13:55:36 +02:00
Bob Weinand
5859044b82
Merge pull request #53 from async-interop/spec
...
Add further specification for loop drivers
2016-05-25 01:55:34 +02:00