Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lib ev easily #356

Closed
jjsaunier opened this issue Feb 24, 2018 · 4 comments
Closed

Support lib ev easily #356

jjsaunier opened this issue Feb 24, 2018 · 4 comments

Comments

@jjsaunier
Copy link
Contributor

jjsaunier commented Feb 24, 2018

Hello,

Currently ReactPHP event loop does not support lib ev as driver. Unfortunately we can't override the loop instanciation from application side. Here a quick solution to implement the support of lib event.

https://gist.github.com/kelunik/0daae3ea11005d03ba7a0bdc4c30b64b

We can add it as composer suggestion, then detect if the amphp is available and enable the adpter. With this approach, no new uneeded dependencies on composer, and we can enable it quickly if we want.

What do you think ?

@marcj
Copy link
Member

marcj commented Feb 24, 2018

Is there a reason this is important to you?

@WyriHaximus
Copy link

WyriHaximus commented Feb 25, 2018

FYI both ev and uv are coming to ReactPHP in the near future:

@andig
Copy link
Contributor

andig commented Feb 25, 2018

Indeed I'd prefer not to support loop implementations outside the core react scope.

@jjsaunier
Copy link
Contributor Author

jjsaunier commented Feb 25, 2018

ha thanks @WyriHaximus ! So I'll wait for it !

Indeed I'd prefer not to support loop implementations outside the core react scope.

Since event loop interface are designed to be more and more interoperable, it could be problematic to going against, moreover for production instrumentation, tests for example.

What are your arguments to keep the loop internal and not a dependency ? There are specific constraint ?

Currently @WyriHaximus solved my issue (:heart:), so I close this topic. Discussion is open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants