Open jimthunderbird opened 12 years ago
Hi, I tried the following code and it gave me "Bus error (core dumped)" or "Segmentation fault (core dumped)" or "zend_mm_heap corrupted" errors, what will be the correct way to run this? Thanks.
<?php $loop = uv_default_loop();
$q1 = uv_queue_work($loop, function(){ sleep(2); echo "[queue1]"; }, function(){ echo "[finished]"; });
$q2 = uv_queue_work($loop, function(){ echo "[queue2]"; }, function(){ echo "[finished]"; });
$q3 = uv_queue_work($loop, function(){ sleep(1); echo "[queue3]"; }, function(){ echo "[finished]"; });
uv_run();
related issue: https://github.com/chobie/php-uv/issues/12
Unfortunately, uv_queue_work doesn't work correctly. probably it's threading problem. it'll take long time to fix.
uv_queue_work
Hi, I tried the following code and it gave me "Bus error (core dumped)" or "Segmentation fault (core dumped)" or "zend_mm_heap corrupted" errors, what will be the correct way to run this? Thanks.
<?php $loop = uv_default_loop();
$q1 = uv_queue_work($loop, function(){ sleep(2); echo "[queue1]"; }, function(){ echo "[finished]"; });
$q2 = uv_queue_work($loop, function(){ echo "[queue2]"; }, function(){ echo "[finished]"; });
$q3 = uv_queue_work($loop, function(){ sleep(1); echo "[queue3]"; }, function(){ echo "[finished]"; });
uv_run();