chobie / php-uv

libuv php extension
184 stars 21 forks source link

process.nextTick functionality like node.js #18

Open superjimpupcake opened 12 years ago

superjimpupcake commented 12 years ago

Hi, How will we do something like node's process.nextTick in php-uv? Thanks. Best Regards, Jim

chobie commented 12 years ago

you can implement it with uv_idle, uv_prepare and uv_check.

https://github.com/chobie/php-uv#resource-uv_idle_initresource-loop https://github.com/chobie/php-uv#resource-uv_prepare_initresource-loop https://github.com/chobie/php-uv#resoruce-uv_check_initresource-loop

this presentation image is very useful to understand it. (but in Japanese) http://www.slideshare.net/slideshow/embed_code/13464412?rel=0&startSlide=20 (notes: 1: update timers, 7: finish handles)

php-uv is experimental. if you have some problem.s please post an issue.