{"action":"created","issue":{"url":"https://api.github.com/repos/laruence/yar/issues/32","labels_url":"https://api.github.com/repos/laruence/yar/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/laruence/yar/issues/32/comments","events_url":"https://api.github.com/repos/laruence/yar/issues/32/events","html_url":"https://github.com/laruence/yar/issues/32","id":39789298,"number":32,"title":"yar 并行调用 不支持设置 timeout","user":{"login":"jianhuihi","id":4176545,"avatar_url":"https://avatars.githubusercontent.com/u/4176545?v=3","gravatar_id":"","url":"https://api.github.com/users/jianhuihi","html_url":"https://github.com/jianhuihi","followers_url":"https://api.github.com/users/jianhuihi/followers","following_url":"https://api.github.com/users/jianhuihi/following{/other_user}","gists_url":"https://api.github.com/users/jianhuihi/gists{/gist_id}","starred_url":"https://api.github.com/users/jianhuihi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jianhuihi/subscriptions","organizations_url":"https://api.github.com/users/jianhuihi/orgs","repos_url":"https://api.github.com/users/jianhuihi/repos","events_url":"https://api.github.com/users/jianhuihi/events{/privacy}","received_events_url":"https://api.github.com/users/jianhuihi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-08-08T03:18:07Z","updated_at":"2015-12-25T10:29:07Z","closed_at":"2014-12-29T06:51:59Z","body":"Yar_Concurrent_Client::call(\"http://rpcapi******\", \"getrelkey\", array('生产毛坯', 'com'), 'callback', 'error_callback', array(YAR_OPT_TIMEOUT=>1));\r\n Yar_Concurrent_Client::loop(); //send\r\n\r\ngetrelkey 函数中sleep 4s\r\n\r\n发现设置的YAR_OPT_TIMEOUT 1s没起作用\r\n\r\n$client = new Yar_Client(\"http://rpcapi**************\");\r\n$client->SetOpt(YAR_OPT_TIMEOUT, 1);\r\n$result = $client->getrelkey(array('生产毛坯', 'com'));\r\nvar_dump($result);\r\n\r\n这样设置的1s能看到效果\r\n\r\n另外php.ini里面设置1000也能看到效果\r\n\r\n系统max os\r\nPHP Version 5.3.28\r\ncurl\r\ncURL support\tenabled\r\ncURL Information\t7.33.0\r\n===============================================\r\nyar\r\nyar support\tenabled\r\nVersion\t1.2.4-dev\r\n\r\nDirective\tLocal Value\tMaster Value\r\nyar.allow_persistent\t0\t0\r\nyar.connect_timeout\t1000\t1000\r\nyar.content_type\tapplication/octet-stream\tapplication/octet-stream\r\nyar.debug\t0\t0\r\nyar.expose_info\tOn\tOn\r\nyar.packager\tphp\tphp\r\nyar.timeout\t5000\t5000\r\nyar.transport\tcurl\tcurl\r\n\r\n盼回复\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/laruence/yar/issues/comments/167220518","html_url":"https://github.com/laruence/yar/issues/32#issuecomment-167220518","issue_url":"https://api.github.com/repos/laruence/yar/issues/32","id":167220518,"user":{"login":"sursir","id":8121715,"avatar_url":"https://avatars.githubusercontent.com/u/8121715?v=3","gravatar_id":"","url":"https://api.github.com/users/sursir","html_url":"https://github.com/sursir","followers_url":"https://api.github.com/users/sursir/followers","following_url":"https://api.github.com/users/sursir/following{/other_user}","gists_url":"https://api.github.com/users/sursir/gists{/gist_id}","starred_url":"https://api.github.com/users/sursir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sursir/subscriptions","organizations_url":"https://api.github.com/users/sursir/orgs","repos_url":"https://api.github.com/users/sursir/repos","events_url":"https://api.github.com/users/sursir/events{/privacy}","received_events_url":"https://api.github.com/users/sursir/received_events","type":"User","site_admin":false},"created_at":"2015-12-25T10:29:07Z","updated_at":"2015-12-25T10:29:07Z","body":"@laruence \r\n\r\n鸟叔。 我正好遇到这个问题。\r\nMulti 单个timeout不起作用。 \r\n如果设置multi的 option 有两个问题 \r\n> 1. `5.5以上才支持`\r\n> 2. `没有找到设置超时的选项`,  多行设置是 CURLM_打头的 但是我在手册上没看到类似设置超时的项\r\n\r\n... 感觉有点坑\r\n求指教怎么可以设置并行超时"}}