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

Asynchronous requests #23

Closed
subnetmarco opened this issue Nov 2, 2013 · 11 comments
Closed

Asynchronous requests #23

subnetmarco opened this issue Nov 2, 2013 · 11 comments

Comments

@subnetmarco
Copy link
Member

I would really like to add asynchronous request support to Unirest-PHP, so that it can match the feature set of the other Unirest libraries (http://unirest.io).

PHP doesn't natively support threads, and it doesn't seem to be a standard practice for achieving this. I would like to encourage a discussion to share some ideas for a possible async implementation.

@CMCDragonkai
Copy link

Curl has multi async right? I'm sure some of the other libraries also have them too.

@mircobabini
Copy link
Contributor

I built an async curl multi request client a couple of years ago, i'll put down few rows of raw code as soon as i found it.

Oh, i forgot to mention this work about fsocket-async: Multiplexing. The curl approach is totally similar.

@slava-vishnyakov
Copy link

Definitely looking forward for async support!

Unirest-PHP is really cool!

@sonicaghi
Copy link
Member

+1

1 similar comment
@websirnik
Copy link

+1

@TransitScreen
Copy link

Unirest really needs this feature to be useful to PHP devs

https://github.com/jmathai/php-multi-curl
https://github.com/petewarden/ParallelCurl

An interesting read that argues for socket reuse rather than forking curl processes: https://segment.io/blog/how-to-make-async-requests-in-php/

@kkeiper1103
Copy link

It's not universal, and I'm not even sure if it works (last time I tried to compile it, it didn't work), but I would really love to see pthreads worked on and finished. With the new standardized threads in C++11, I would think it'd be possible now.

@yousafsyed
Copy link

here is new php framework which is async.I think this will be help full http://reactphp.org/

@harikt
Copy link

harikt commented Nov 21, 2014

Good to checkout https://github.com/amphp/artax

@cdnsteve
Copy link

cdnsteve commented Dec 9, 2014

While not native, hhvm has basic support that could be used. http://docs.hhvm.com/manual/en/hack.async.php

@ahmadnassri
Copy link
Contributor

closing this, until a PR is made.

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