From b5f0236d25a571c010ab0db278d189e48e5aecc7 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 2 Dec 2013 04:34:38 +0000 Subject: [PATCH] Update example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332234 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/yar/examples.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reference/yar/examples.xml b/reference/yar/examples.xml index 775dce316d..fc2afc9bb6 100644 --- a/reference/yar/examples.xml +++ b/reference/yar/examples.xml @@ -99,9 +99,12 @@ function callback($ret, $callinfo) { echo $callinfo['method'] , " result: ", $ret , "\n"; } +/* register async call to remote services */ Yar_Concurrent_Client::call("http://example.com/operator.php", "add", array(1, 2), "callback"); Yar_Concurrent_Client::call("http://example.com/operator.php", "sub", array(2, 1), "callback"); Yar_Concurrent_Client::call("http://example.com/operator.php", "mul", array(2, 2), "callback"); + +/* sent all request and wait for response */ Yar_Concurrent_Client::loop(); ?> ]]>