-
Notifications
You must be signed in to change notification settings - Fork 3
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
Avoid dependency on the Loop #18
Comments
Oops just see : https://github.com/async-interop/promise/pull/17/commits which partially resolved our use case, but is there a way to detect if a loop is running appart from getting the driver and tracking the exception ? |
@joelwurtz FYI here is some more information regarding the loop: reactphp/promise#64 (comment) (doesn't answer your latest question though) |
@joelwurtz We already discussed that yesterday, we will completely remove the dependency. I'll post a PR soon. |
Nice, is this discussion publicly available somewhere ? (very interessed to see the reflexion about this) |
PR is linked. Discussion is publicly available here: http://chat.stackoverflow.com/transcript/message/34040899#34040899 |
Hi,
Actually when executing a callback on the
when
method this spec specify that :This specification introduce a high dependency on the event-loop for people creating a promise implementation.
This is problematic for our use case at https://github.com/php-http, because we use the
Promise
as the main API return value for our plugin system (see https://github.com/php-http/client-common). This allow us to use the same API for async and sync calls as it relatively easy to go from async API to sync API (you just need to wait or use already resolved promise) so we can write code that are compatible on both worlds.However having this dependency on the loop will force all people using the plugin system to have an event loop even in the sync mode.
Is there a way to avoid having this dependency ?
The text was updated successfully, but these errors were encountered: