note 118293 added to yar.examples

From: Date: Tue, 10 Nov 2015 11:03:57 +0000
Subject: note 118293 added to yar.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-204130@lists.php.net to get a copy of this message
<?php function callback($ret, $callinfo) { echo $callinfo['method'] , " result: ", $ret , "\n"; } /* 注册一个异步调用 */ Yar_Concurrent_Client::call("http://example.com/operator.php", "add", array(1, 2), "callback"); /* 发送所有注册的调用, 等待返回, 返回后Yar会调用callback回掉函数 */ Yar_Concurrent_Client::loop(); /* 重置call ,否则上面的call会调用*/ Yar_Concurrent_Client::reset(); Yar_Concurrent_Client::call("http://example.com/operator.php", "sub", array(2, 1), "callback"); Yar_Concurrent_Client::loop(); ?> ---- Server IP: 72.52.91.14 Probable Submitter: 58.96.172.185 ---- Manual Page -- http://php.net/manual/en/yar.examples.php Edit -- https://master.php.net/note/edit/118293 Del: integrated -- https://master.php.net/note/delete/118293/integrated Del: useless -- https://master.php.net/note/delete/118293/useless Del: bad code -- https://master.php.net/note/delete/118293/bad+code Del: spam -- https://master.php.net/note/delete/118293/spam Del: non-english -- https://master.php.net/note/delete/118293/non-english Del: in docs -- https://master.php.net/note/delete/118293/in+docs Del: other reasons-- https://master.php.net/note/delete/118293 Reject -- https://master.php.net/note/reject/118293 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204130) next »