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 another EventLoop backend #152

Closed
Gemorroj opened this issue Feb 23, 2018 · 3 comments
Closed

Support another EventLoop backend #152

Gemorroj opened this issue Feb 23, 2018 · 3 comments

Comments

@Gemorroj
Copy link

https://pecl.php.net/package/ev
http://docs.php.net/ev
any plans/ideas about implement adapter for this librarty?

@WyriHaximus
Copy link
Member

Yes it is in the works for 0.5: #148 and there is also an event-loop in the works for ext-uv #112

@Gemorroj
Copy link
Author

thanks!

@kelunik
Copy link
Contributor

kelunik commented Feb 23, 2018

You can also use amphp/react-adapter + amphp/amp, which will give you an ev based implementation – if ev is installed – that is fully compatible with ReactPHP's LoopInterface.

$driver = (new Amp\Loop\DriverFactory)->create();
$loop = new Amp\ReactAdapter\ReactAdapter($driver);

// $loop is now a ReactPHP compatible driver based on ext-ev

If you don't want the automatic driver selection based on the available extensions, you can also instantiate a driver on your own using $driver = new Amp\Loop\EvDriver;.

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

3 participants