Aaron Piotrowski
ffde57f0d1
Make watcher ID first parameter
2016-05-19 10:30:38 -05:00
Bob Weinand
78de0c947b
Merge pull request #31 from async-interop/registry
...
Add loop bound state registry
2016-05-19 12:40:37 +02:00
Bob Weinand
d03a2c14e6
Add getLoopHandle() for accessing the underlying loop
...
These resources or objects may then be attributed to a specific extension via instanceof or get_resource_type() in implementations.
Fixes #16 .
2016-05-19 01:12:56 +02:00
Niklas Keller
3992374209
Apply ugly FIG braces style
2016-05-16 11:33:58 +02:00
Niklas Keller
54915e31bc
Add phpunit to require-dev again
2016-05-16 11:33:04 +02:00
Niklas Keller
698d292d2c
Add test to autoload-dev
2016-05-16 11:02:14 +02:00
Niklas Keller
8b3555c552
Change namespace of Registry
2016-05-16 11:02:14 +02:00
Niklas Keller
2555defa58
Fixup registry reset after execution of the loop
2016-05-16 11:02:13 +02:00
Niklas Keller
679651b242
Refactor Registry into a trait, so it can be tested separately
2016-05-16 11:02:13 +02:00
Niklas Keller
333a9daf5a
Add loop bound state registry
...
The registry allows to store information bound to a specific loop.
This can be useful to store state of globals like a DNS resolver.
Rationale for a global DNS resolver:
Nobody wants to inject a resolver into everything that does some sort of I/O.
Using IP addresses everywhere instead of hostnames also doesn't make sense.
Therefore there should be a global default DNS resolver. But this resolver
needs a read watcher for the response. If the loop gets swapped and a DNS
request is made, the resolver would never get the read event, since the
stream is only watched in the old loop. The resolver also doesn't get any
info about the loop swap, so it can't use a new watcher.
With a loop bound registry, it can just store the connection in the loop and
will use a new connection when the loop is swapped, because the state doesn't
exist any longer. Once the loop is put back, it can use the old connection
again.
This API should only be used by real global objects. Most packages won't need
to use this API, but it's required for the mentioned use cases.
2016-05-16 11:02:13 +02:00
Andrew Carter
30fc5464cc
Merge pull request #38 from async-interop/description
...
Change package description to include 'for interoperability'
2016-05-16 10:00:08 +01:00
Niklas Keller
017f1d2149
Change package description to include 'for interoperability'
2016-05-15 17:21:56 +02:00
Bob Weinand
ff9d6fb61d
Merge pull request #36 from async-interop/namespace
...
Shorten namespace to Interop\Async and correct PHP version requirement
2016-05-15 16:51:59 +02:00
Niklas Keller
992b3e4e5a
Remove 'for interoperability' from the description
2016-05-15 16:47:51 +02:00
Niklas Keller
a32c1c36d2
Shorten namespace to Interop\Async and correct PHP version requirement
2016-05-15 14:40:07 +02:00
Aaron Piotrowski
d5126870c4
Event -> Watcher
...
Methods return watchers for events, not events.
2016-05-14 17:19:05 -05:00
Aaron Piotrowski
5b283d69e9
Define watcher callback signatures
2016-05-14 17:14:33 -05:00
Aaron Piotrowski
38a3da4889
Add $data parameter to watchers
2016-05-14 17:13:35 -05:00
Andrew Carter
95c2f35e60
Merge pull request #32 from async-interop/support
...
Add Loop::supports to check for optional features
2016-05-14 16:59:17 +01:00
Niklas Keller
5a84c8336e
Add Loop::supports to check for optional features
2016-05-13 23:41:54 +02:00
Bob Weinand
deb801b941
Merge pull request #26 from async-interop/loop-name
...
Rename EventLoop → Loop and EventLoopDriver → LoopDriver
2016-05-12 18:26:14 +02:00
Niklas Keller
ef68e03c52
Rename EventLoop → Loop and EventLoopDriver → LoopDriver
2016-05-12 17:57:02 +02:00
Niklas Keller
77bfdd55a7
Improve changelog formatting
2016-05-12 16:49:46 +02:00
Bob Weinand
4f2161da5f
Fix notices in NativeReactor; prepare tag 1.2.2
2016-05-12 14:54:59 +02:00
Andrew Carter
4b3a8411b3
Merge pull request #17 from AndrewCarterUK/static-class-protot
...
Static Class Prototype
2016-05-12 12:52:45 +01:00
Andrew Carter
83596a6b7a
Disabled constructor by maknig private (removed LogicException)
2016-05-12 12:27:24 +01:00
Andrew Carter
4195b46440
Changed time delays from int to float
2016-05-12 11:40:24 +01:00
Andrew Carter
19e4c8f58b
Merge pull request #21 from kelunik/time-units
...
Change time units to integer and milliseconds
2016-05-12 11:33:35 +01:00
Niklas Keller
8baea83f30
Change time units to integer and milliseconds
2016-05-12 12:28:46 +02:00
Bob Weinand
87a5f29ab4
Fix potential infinite loop in UvReactor::run(); prepare tag 1.2.1
2016-05-12 07:51:11 +02:00
Niklas Keller
bb85e40ce1
Merge pull request #46
...
Add tests for resolve callables
2016-05-11 19:14:33 +02:00
Chris Wright
6f4433dd1c
Add tests for resolve callables
2016-05-11 18:07:58 +01:00
Bob Weinand
452c9b7295
Force leading backslashes everywhere
2016-05-11 18:53:20 +02:00
Niklas Keller
d9aa8573f0
Throw InvalidArgumentException if argument to resolve() is neither callable nor an instance of Generator
2016-05-11 18:49:25 +02:00
Bob Weinand
92e004264c
resolve() accepts callables returning generators - added to changelog
2016-05-11 18:28:19 +02:00
Chris Wright
3ab10de2a2
Accept callables to resolve()
2016-05-11 17:13:15 +01:00
Bob Weinand
cc7db038b3
Fix mem leaks & circular reference; prepare tag 1.1.1
2016-05-11 03:36:46 +02:00
Andrew Carter
d781ac94d6
Merge pull request #20 from async-interop/AndrewCarterUK-php5-patch
...
Removed scalar type hints
2016-04-15 11:51:56 +01:00
Andrew Carter
89332e5b0f
Removed scalar type hints
2016-04-11 11:31:30 +01:00
Andrew Carter
624060c67f
Removed inScope()
2016-04-11 11:30:42 +01:00
Andrew Carter
882723d7e2
Update EventLoopDriver.php
2016-04-11 11:22:54 +01:00
Andrew Carter
dace2d8226
Removed scalar type hints
2016-04-11 11:19:52 +01:00
Niklas Keller
66fa98dfc1
Merge pull request #42 from staabm/patch-2
...
Cache composer dependecies for faster builds
2016-04-08 17:23:02 +02:00
Markus Staab
a3e5464039
Cache composer dependecies for faster builds
2016-04-01 16:42:32 +02:00
Andrew Carter
6113525227
Merge pull request #18 from async-interop/readme
...
README
2016-03-31 22:21:57 +01:00
Andrew Carter
7d15156f97
Create README.md
2016-03-31 15:33:44 +01:00
Andrew Carter
71fcb29126
Merge branch 'master' of github.com:async-interop/event-loop into HEAD
2016-03-29 22:20:07 +01:00
Aaron Piotrowski
eca2278de2
Merge pull request #3 from AndrewCarterUK/prototype
...
Event Loop Driver Prototype
2016-03-29 14:35:54 -05:00
Andrew Carter
54c4ded85b
Missing static's
2016-03-23 16:47:37 +00:00
Andrew Carter
c6184ed91b
Scope validation and driver retrieval
2016-03-23 10:22:54 +00:00