Skip to content

Instantly share code, notes, and snippets.

@chobie
Created July 16, 2012 15:15
Show Gist options
  • Save chobie/3123273 to your computer and use it in GitHub Desktop.
Save chobie/3123273 to your computer and use it in GitHub Desktop.
<?php
//https://github.com/chobie/php-uv
$loop = uv_default_loop();
$queue = uv_queue_work($loop, function(){
var_dump("[queue]");
}, function(){
var_dump("[finished]");
});
uv_run();
/* on OSX.
[queue]string(7) ""
string(10) "[finished]"
[Tue Jul 17 00:14:35 2012] Script: 'examples/queue.php'
---------------------------------------
/private/tmp/.sources/5.4.1-zts-goto/php-5.4.0/Zend/zend_opcode.c(356) : Block 0x110ade0c8 status:
Invalid pointer: ((thread_id=0x10ADA000) != (expected=0x756CF960))
---------------------------------------
[Tue Jul 17 00:14:35 2012] Script: 'examples/queue.php'
---------------------------------------
/private/tmp/.sources/5.4.1-zts-goto/php-5.4.0/main/SAPI.c(538) : Block 0x110ade4a8 status:
Invalid pointer: ((thread_id=0x10ADA000) != (expected=0x756CF960))
---------------------------------------
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment