{"id":18415,"date":"2023-08-28T06:52:16","date_gmt":"2023-08-27T22:52:16","guid":{"rendered":"\/\/www.viralrail.com\/?p=18415"},"modified":"2023-08-28T06:52:16","modified_gmt":"2023-08-27T22:52:16","slug":"dlfyihnyqdfx","status":"publish","type":"post","link":"\/\/www.viralrail.com\/blog\/18415.html","title":{"rendered":"\u591a\u8def\u590d\u7528IO\u548cNIO\uff1a\u4f18\u7f3a\u70b9\u5206\u6790"},"content":{"rendered":"
\u591a\u8def\u590d\u7528IO\u548cNIO\u662f\u8ba1\u7b97\u673a\u7f51\u7edc\u4e2d\u5e38\u89c1\u7684\u4e24\u79cdI\/O\u6280\u672f\uff0c\u5b83\u4eec\u5728\u7f51\u7edcI\/O\u64cd\u4f5c\u4e2d\u6709\u7740\u91cd\u8981\u7684\u4f5c\u7528\u3002\u672c\u6587\u5c06\u4ece\u591a\u8def\u590d\u7528IO\u548cNIO\u7684\u4f18\u7f3a\u70b9\u5206\u6790\u51fa\u53d1\uff0c\u6df1\u5165\u5256\u6790\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\uff0c\u4ee5\u53ca\u5b83\u4eec\u5728\u7f51\u7edcI\/O\u64cd\u4f5c\u4e2d\u7684\u5e94\u7528\u3002<\/p>\n
\u591a\u8def\u590d\u7528IO\uff08Multiplexed IO\uff09\u662f\u4e00\u79cdI\/O\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u540c\u65f6\u5904\u7406\u591a\u4e2aI\/O\u8bf7\u6c42\uff0c\u6bd4\u5982TCP\u8fde\u63a5\u548c\u6587\u4ef6I\/O\u64cd\u4f5c\u3002\u591a\u8def\u590d\u7528IO\u7684\u57fa\u672c\u539f\u7406\u662f\uff1a\u5c06\u591a\u4e2aI\/O\u8bf7\u6c42\u5c01\u88c5\u6210\u4e00\u4e2a\u6570\u636e\u5305\uff0c\u7136\u540e\u901a\u8fc7\u4e00\u4e2aI\/O\u8c03\u7528\u6765\u5904\u7406\u8fd9\u4e2a\u6570\u636e\u5305\uff0c\u4ece\u800c\u5b9e\u73b0\u591a\u4e2aI\/O\u8bf7\u6c42\u7684\u5904\u7406\u3002<\/p>\n
NIO\uff08Non-Blocking I\/O\uff09\u662f\u4e00\u79cdI\/O\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u975e\u963b\u585e\u7684I\/O\u64cd\u4f5c\uff0c\u6bd4\u5982TCP\u8fde\u63a5\u548c\u6587\u4ef6I\/O\u64cd\u4f5c\u3002NIO\u7684\u57fa\u672c\u539f\u7406\u662f\uff1a\u5f53I\/O\u8bf7\u6c42\u53d1\u8d77\u65f6\uff0c\u7cfb\u7edf\u4f1a\u7acb\u5373\u8fd4\u56de\u4e00\u4e2a\u7ed3\u679c\uff0c\u8868\u660eI\/O\u8bf7\u6c42\u662f\u5426\u88ab\u63a5\u53d7\uff0c\u800c\u4e0d\u4f1a\u7b49\u5f85I\/O\u8bf7\u6c42\u7684\u5b8c\u6210\u3002<\/p>\n
\u4ece\u4e0a\u9762\u7684\u5206\u6790\u53ef\u4ee5\u770b\u51fa\uff0c\u591a\u8def\u590d\u7528IO\u548cNIO\u90fd\u662f\u975e\u5e38\u6709\u7528\u7684I\/O\u6280\u672f\uff0c\u5b83\u4eec\u90fd\u53ef\u4ee5\u6709\u6548\u5730\u63d0\u9ad8\u7cfb\u7edf\u7684I\/O\u6548\u7387\uff0c\u51cf\u5c11\u7cfb\u7edf\u8d44\u6e90\u6d88\u8017\uff0c\u63d0\u9ad8\u7cfb\u7edf\u7684\u53ef\u4f38\u7f29\u6027\u3002<\/strong>\u4f46\u662f\uff0cNIO\u7684\u6027\u80fd\u6bd4\u591a\u8def\u590d\u7528IO\u8981\u9ad8\uff0c\u7279\u522b\u662f\u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\uff0cNIO\u7684\u6027\u80fd\u4f1a\u6709\u660e\u663e\u7684\u63d0\u5347\u3002\u56e0\u6b64\uff0c\u5728\u5b9e\u9645\u7684\u7f51\u7edcI\/O\u64cd\u4f5c\u4e2d\uff0c\u5e94\u8be5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u6765\u9009\u62e9\u5408\u9002\u7684I\/O\u6280\u672f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u591a\u8def\u590d\u7528IO\u548cNIO\u662f\u8ba1\u7b97\u673a\u7f51\u7edc\u4e2d\u5e38\u89c1\u7684\u4e24\u79cdI\/O\u6280\u672f\uff0c\u5b83\u4eec\u5728\u7f51\u7edcI\/O\u64cd\u4f5c\u4e2d\u6709\u7740\u91cd\u8981\u7684\u4f5c\u7528\u3002\u672c\u6587\u5c06\u4ece\u591a\u8def\u590d\u7528IO\u548cNIO\u7684\u4f18\u7f3a\u70b9\u5206\u6790\u51fa\u53d1\uff0c\u6df1\u5165\u5256\u6790\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\uff0c\u4ee5\u53ca\u5b83<\/p>\n","protected":false},"author":1,"featured_media":3671,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[174],"class_list":["post-18415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dlfy"],"_links":{"self":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/18415"}],"collection":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/comments?post=18415"}],"version-history":[{"count":0,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/18415\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media\/3671"}],"wp:attachment":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media?parent=18415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/categories?post=18415"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/tags?post=18415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}