I just wanna ask something about Yii. I realize that Yii page (controller - method) cannot be access in same time (with same browser, different tab). The page must be completed process first before user can open another page.
class SiteController extends CController {
public function actionIndex() {
echo "Test1";
sleep(10);
echo "Test2"
}
public function actionIndex2() {
echo "Test1";
sleep(10);
echo "Test2";
}
}
For example, when I access http://test.com/site/index at 13.00, and http://test.com/site/index2 at 13.01, http://test.com/site/index will be rendered at 13.10 and http://test.com/site/index2 will be rendered around 13.20 or 13.21. What I am expecting is the code will run parallel, the first one will be finish in 13.10 and the second one will be finish in 13.10 or 13.11. Like php script below (rename it test.php), and run in separate tab (but same browser).
<?php
echo "Test1";
sleep(10);
echo "Test2";
?>
So Yii can response multiple request in same time without completing previous request. Same problem I found in here: http://www.yiiframework.com/forum/index.php/topic/41358-multiple-simultaneous-http-requestssolved/ and here http://www.yiiframework.com/forum/index.php/topic/11881-write-delay-with-sessionscache/
I am still finding the best solution. I'm trying this Yii framework async request and PHP Asynchronous Method Call In The Yii Framework for now...
Thanks