{"id":110538,"date":"2020-06-03T00:51:30","date_gmt":"2020-06-02T16:51:30","guid":{"rendered":"http:\/\/4563.org\/?p=110538"},"modified":"2020-06-03T00:51:30","modified_gmt":"2020-06-02T16:51:30","slug":"%e5%85%b3%e4%ba%8e%e7%88%ac%e8%99%ab%e5%bc%82%e6%ad%a5%e5%a4%9a%e7%ba%bf%e7%a8%8b%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=110538","title":{"rendered":"\u5173\u4e8e\u722c\u866b\u5f02\u6b65\u591a\u7ebf\u7a0b\u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e\u722c\u866b\u5f02\u6b65\u591a\u7ebf\u7a0b\u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuban10703 <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6700\u8fd1\u4e00\u76f4\u5728\u7814\u7a76 py \u7684\u5f02\u6b65&#8230;&#8230;<\/p>\n<p>\u6240\u4ee5\u60f3\u628a\u4e4b\u524d\u6574\u7684\u4e00\u4e2a P \u7ad9\u6536\u85cf\u5939\u7684\u722c\u866b\u6362\u6210\u5f02\u6b65,\u4f46\u662f\u60f3\u4e86\u60f3,\u8c8c\u4f3c\u6536\u85cf\u5939\u7ffb\u9875\u7684\u90e8\u5206\u597d\u50cf\u6574\u4e0d\u4e86\u5f02\u6b65?..<\/p>\n<p>\u722c\u866b\u4ee3\u7801<\/p>\n<p>(\u5199\u7684\u5f88\u4e71&#8230;..      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>11<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1841074\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u524d\u51e0\u5929\u521a\u770b\u5230\u7684&#8230; <br \/>Guide to Concurrency in Python with Asyncio \u22c6 Mark McDonnell &#8211; https:\/\/www.integralist.co.uk\/posts\/python-asyncio\/<\/p>\n<p>\u5176\u4ed6\u7684\u641c\u7d22\u7ed3\u679c https:\/\/www.clericpy.top\/newspaper\/articles.query.html?query=asyncio&amp;date=&amp;start_time=&amp;end_time=&amp;source=&amp;lang=ANY&amp;order_by=ts_create&amp;sorting=desc&amp;limit=10&amp;offset= \u53ea\u770b\u56db\u661f\u4ee5\u4e0a\u7ed3\u679c\u5427, \u8fd9\u4e2a\u8fc7\u6ee4\u5668\u5f53\u521d\u5fd8\u4e86\u5199&#8230; \u8fc7\u51e0\u5929\u518d\u8865<\/p>\n<p>\u7136\u540e, asyncio \u7528\u7684\u65f6\u5019\u548c\u591a\u7ebf\u7a0b\u6709\u70b9\u50cf, \u4f46\u662f\u53c8\u5f88\u591a\u533a\u522b, \u5b98\u65b9\u5982\u679c\u80fd\u8bbe\u8ba1\u7684\u50cf gevent \u90a3\u79cd\u5c31\u597d\u4e86&#8230; \u4e0d\u5410\u69fd\u4e86, \u5927\u81f4\u8981\u770b\u7684\u5c31\u662f Future \u7684\u601d\u60f3, \u7136\u540e\u77e5\u9053 asyncio.Task \u662f\u4e00\u4e2a\u5df2\u7ecf\u5728\u6267\u884c\u7684\u534f\u7a0b\u4efb\u52a1, \u5982\u679c\u4f60\u7684\u6570\u636e\u5e93\u64cd\u4f5c\u5e93\u4e0d\u652f\u6301\u534f\u7a0b, \u5c31\u53ea\u80fd\u4e22\u5230\u4e00\u4e2a &#8220;\u7ebf\u7a0b executor&#8221; \u91cc\u9762\u505a\u4e00\u4e2a\u534f\u7a0b\u5305\u88c5(\u4e5f\u5c31\u662f\u4e22\u7ed9\u7ebf\u7a0b, \u4f46\u53ef\u4ee5\u88ab await)<\/p>\n<p>\u81f3\u4e8e\u4f60\u8bf4\u7684\u4ece\u4e0a\u4e00\u6b65\u7ed3\u679c\u91cc\u53d6, \u90a3\u5c31\u662f\u4e2a\u4e32\u884c\u5173\u8054\u4e86, \u56e0\u4e3a\u7b2c\u4e8c\u6b65\u53ef\u80fd\u4e5f\u8981\u7528\u534f\u7a0b, \u6240\u4ee5\u5c31\u5c3d\u91cf\u522b\u7528 add_done_callback, \u505a\u597d await \u5c31\u884c\u4e86<\/p>\n<p>\u591a\u6570\u4eba\u7528\u534f\u7a0b\u7684\u65f6\u5019\u5f88\u5c11\u4f1a\u5f00\u591a\u4e2a\u7ebf\u7a0b\u7136\u5b83\u5355\u72ec\u8dd1\u4e00\u4e2a\u4e8b\u4ef6\u5faa\u73af, \u56e0\u4e3a\u4e00\u4e0d\u5c0f\u5fc3\u901a\u4fe1\u8fc7\u7a0b\u4f1a\u9047\u5230 different loop thread \u4e4b\u7c7b\u7684 runtime error, \u6240\u4ee5\u7528 executor \u5305\u88c5\u4e0b\u66f4\u7701\u5fc3<\/p>\n<p>\u6ca1\u4ee3\u7801\u4e5f\u8bf4\u4e0d\u4e86\u592a\u591a\u4e86                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841075\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : renmu123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u53ef\u4ee5\u83b7\u53d6\u5168\u90e8\u8d44\u6599\u540e\u4e00\u53e3\u6c14\u5b58\u5230\u6570\u636e\u5e93\uff0c\u6ca1\u5fc5\u8981\u83b7\u53d6\u4e00\u6b21\u5b58\u4e00\u6b21                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841076\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yuban10703 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @renmu123 emm, api \u7684\u8bf7\u6c42\u4e4b\u95f4\u6709 5s \u5de6\u53f3\u7684\u95f4\u9694,\u4e3b\u8981\u662f\u60f3\u5229\u7528\u8fd9\u4e9b\u65f6\u95f4&#8230;.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841077\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jugelizi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u54c8\u54c8 \u8fd9\u79cd\u4e00\u822c\u6211\u4e22\u4efb\u52a1\u961f\u5217 <br \/>\u4e00\u4e2a\u4efb\u52a1\u53bb\u6293\u5217\u8868 \u5b58\u6570\u636e\u5e93 \u518d\u63a8\u9001\u961f\u5217 <br \/>\u53e6\u5916\u4e00\u4e2a\u4e0d\u65ad\u6d88\u8d39                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841078\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yuban10703 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jugelizi \u6211\u53bb\u7814\u7a76\u7814\u7a76                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841079\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : daimiaopeng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u7528 cpp \u5199\u7684\u591a\u7ebf\u7a0b http \u5e93\u53ef\u4ee5\u4e86\u89e3\u4e00\u4e0b\uff1a https:\/\/github.com\/daimiaopeng\/fast_requests                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841080\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yuban10703 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @daimiaopeng (\u2606\u25bd\u2606)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841081\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ruanimal <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u60f3\u5f02\u6b65\u9700\u8981\u6362\u5e93\uff0crequests \u5f97\u6362\u6210\u5bf9\u5e94\u7684\u5f02\u6b65\u5e93\uff0c\u8fd8\u6709\u6570\u636e\u5e93\u76f8\u5173\u7684\u5e93\u4e5f\u662f\uff0c\u4e0d\u7136\u5f02\u6b65\u6ca1\u5565\u610f\u4e49                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841082\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : octobersnow <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @daimiaopeng \u6700\u5feb\u5728\u54ea\u91cc\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841083\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : black11black <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u8001\u5b9e\u5148\u770b\u4e00\u904d\u5e9e\u6742\u7684 aysncio \u6587\u6863\uff0c\u4e86\u89e3\u4e00\u4e0b\u5f02\u6b65\u5927\u6982\u662f\u4ec0\u4e48\uff0c\u4f60\u8fd9\u4e9b\u95ee\u7684\u90fd\u54ea\u8ddf\u54ea\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1841084\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coderunI <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u9700\u8981 redis                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e\u722c\u866b\u5f02\u6b65\u591a\u7ebf\u7a0b\u7684\u95ee\u9898 \u8cc7\u6df1\u5927\u4f6c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/110538"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110538"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/110538\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110538"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}