chobie / php-uv

libuv php extension
184 stars 21 forks source link

Fixed uv_run_once + added a return value #39

Closed csaoh closed 11 years ago

csaoh commented 11 years ago

I noticed libuv doesn't use uv_run_once but uv_run(loop, UV_RUN_ONCE) instead, so I couldn't make php-uv to work anymore.

csaoh commented 11 years ago

@chobie I also took the liberty to add a return value to uv_run_once. Theoretically it should return 0 if there are no more events in the queue. This should allow replacing uv_run by a loop of uv_run_once, and with this I was able to implement stop and resume methods within react-php.

Hope it's ok for you.

csaoh commented 11 years ago

Fixed. I got kind of messed up in commits though...

csaoh commented 11 years ago

Do you want me to close all of this, make sure i'm up-to-date and reopen another PR ? Or you will simply drop the uv_run_once ?

chobie commented 11 years ago

for now, i'll merge your PR :smile: