{"id":553849,"date":"2022-02-02T23:29:04","date_gmt":"2022-02-02T15:29:04","guid":{"rendered":"http:\/\/4563.org\/?p=553849"},"modified":"2022-02-02T23:29:04","modified_gmt":"2022-02-02T15:29:04","slug":"%e6%b1%82%e5%8a%a9%ef%bc%9a-net-core-webapi-%e6%a1%86%e6%9e%b6%e8%87%aa%e5%8a%a8%e7%94%9f%e6%88%90%e7%9a%84-controller-%e4%b8%ad%e7%9a%84-get-%e5%85%a8%e9%83%a8%e5%af%b9%e8%b1%a1%e7%9a%84%e6%96%b9-4","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=553849","title":{"rendered":"\u6c42\u52a9\uff1a.NET Core WebAPI \u6846\u67b6\u81ea\u52a8\u751f\u6210\u7684 Controller \u4e2d\u7684 get \u5168\u90e8\u5bf9\u8c61\u7684\u65b9\u6cd5\u6267\u884c\u592a\u6162"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1> \u6c42\u52a9\uff1a.NET Core WebAPI \u6846\u67b6\u81ea\u52a8\u751f\u6210\u7684 Controller \u4e2d\u7684 get \u5168\u90e8\u5bf9\u8c61\u7684\u65b9\u6cd5\u6267\u884c\u592a\u6162 <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : libasten <\/span>  <span><i><\/i> 15<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> \u6846\u67b6\u81ea\u52a8\u751f\u6210\u7684\u4ee3\u7801\uff1a<br \/>&#8220;`<br \/>[HttpGet]<br \/>public async Task&lt;ActionResult&lt;IEnumerable&lt;DocItem&gt;&gt;&gt; GetDocItem()<br \/>{<br \/> return await _context.DocItem.ToListAsync();<br \/>}<br \/>&#8220;`<br \/>\u6570\u636e\u5e93\u4e2d 4000 \u6761\u6570\u636e\uff0c\u6267\u884c\u8fd9\u4e2a api \u5361\u987f 2 \u5206\u949f\u90fd\u6ca1\u6709\u53cd\u5e94\u3002<br \/>\u4e0d\u8981\u540e\u53f0\u5206\u9875\u7684\u5efa\u8bae\uff0c\u56e0\u4e3a\u9700\u6c42\u662f\u60f3\u4e00\u6b21\u6027\u628a\u8fd9 4000 \u6761\u90fd\u8fd4\u56de\u7ed9\u524d\u53f0\u3002  <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>75<\/span>) <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"7077715\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shangsharon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u6570\u636e\u5e93\u8868\u5355\u6761\u8bb0\u5f55\u5f88\u5927\u5417?<br \/>\u4f60\u7684 2 \u5206\u949f\u662f\u54ea\u91cc\u7edf\u8ba1\u7684,\u53ef\u4ee5\u8ba1\u7b97\u4e00\u4e0b\u670d\u52a1\u7aef\u7684\u6267\u884c\u8017\u65f6 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077716\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u8fd9\u4e2a\u6162\u80af\u5b9a\u548c\u6846\u67b6\u65e0\u5173\uff0c\u8fd9\u4e48\u70b9\u4ee3\u7801\u4e0d\u592a\u4f1a\u6709\u4ec0\u4e48\u95ee\u9898\u3002\u8981\u8bf4\u7684\u8bdd\u4e5f\u5c31\u662f\u4f60\u5176\u5b83\u7684\u914d\u7f6e\u53ef\u80fd\u4f1a\u6709\u95ee\u9898\u3002\u4f46\u662f\u6211\u89c9\u5f97\u53ef\u80fd\u6700\u5927\u7684\u8fd8\u662f\u4f60\u7684\u6570\u636e\u5e93\u6162\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077717\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Nasei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u5148\u628a\u6027\u80fd\u63a2\u67e5\u5668\u6253\u5f00\u505a\u4e2a profile \uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077718\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : pixiaotiao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u53ef\u4ee5\u770b\u4e0b\u662f\u4e0d\u662f\u6570\u636e\u4f20\u8f93\u6162 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077719\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jones2000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u4e0d\u8981\u7528\u6570\u636e\u5e93\uff0c\u8fd4\u56de 4000 \u6761\u968f\u673a\u6570\u636e\u770b\u770b\u662f\u4e0d\u662f\u6162\u3002 \u5982\u679c\u4e0d\u6162\uff0c \u627e\u6570\u636e\u90e8\u95e8\u67e5\u95ee\u9898\u5427\uff0c \u4e0d\u662f\u5f00\u53d1\u7684\u95ee\u9898\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077720\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0o0o0o0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u663e\u7136\u4e0d\u662f\u6846\u67b6\u95ee\u9898 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077721\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : thinkershare <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u53ef\u6570\u636e\u5e93\u6253\u67e5\u8be2\u65e5\u5fd7, \u770b\u4e0b\u67e5\u8be2\u8017\u8d39\u7684\u4e8b\u4ef6, \u8fd9\u4e2a\u4e0d\u53ef\u80fd\u662f\u6846\u67b6\u7684\u95ee\u9898! <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077722\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : skinny <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u8fd9\u65e0\u8bba\u5982\u4f55\u4e5f\u6ca1\u6cd5\u628a\u9505\u7529 .Net \u5427\uff0c4000 \u6761\u4e24\u5206\u949f\u5509\uff0c\u53ef\u80fd\u6570\u636e\u5e93\u54ea\u91cc\u6709\u95ee\u9898\uff0c\u800c\u4e14\u4e5f\u4e0d\u4e00\u5b9a\u662f\u6570\u636e\u5e93\u65b9\u9762\u7684\u95ee\u9898\uff0c\u4f60\u67e5\u67e5\u4f60\u7684\u8fd0\u884c\u73af\u5883\u548c\u7cfb\u7edf\u72b6\u6001\u5427 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077723\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : beginor <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u7528 profiler \u8ddf\u8e2a\u4e00\u4e0b\uff0c\u5f88\u4e45\u4e4b\u524d\u78b0\u5230\u8fc7\u7c7b\u4f3c\u7684\u95ee\u9898\uff0c \u7528 profiler \u8ddf\u8e2a\u53d1\u73b0\u662f\u6ca1\u6709\u5199\u5165\u65e5\u5fd7\u6587\u4ef6\u7684\u6743\u9650 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077724\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hurrytospring <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u3002\u3002\u3002\u8fd9\u9505\u80af\u5b9a\u4e0d\u662f\u4ece\u6846\u67b6\u6027\u80fd\u6392\u67e5\u8d77\u7684\u3002\u3002\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077725\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : afirefish <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u6211\u89c9\u5f97\u8fd9\u9505\u4e0d\u5e94\u8be5\u7529\u5230\u6846\u67b6\u4e0a\u9762\u53bb\u3002\u5148\u67e5 1 \u6761\u6570\u636e\u5e93\u8bd5\u8bd5\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077726\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : quan01994 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u770b\u4f60\u7528\u7684\u662f ef ,\u8981\u4e0d\u4f60\u6253\u5370\u4e00\u4e0b sql \u770b\u770b<br \/>protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)<br \/>{<br \/> optionsBuilder.UseLoggerFactory( );<br \/>} <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077727\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : libasten <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @shangsharon \u5355\u8868\u8bb0\u5f55\u4e0d\u5927\uff0c\u5341\u6765\u4e2a\u5b57\u6bb5\uff0c\u6bcf\u6700\u957f\u7684\u5b57\u6bb5\u91cc\u5c31\u4e00\u53e5 100 \u4e2a\u5b57\u4e0d\u5230\u7684\u6587\u672c\uff0c\u6211\u8bf4\u7684 2 \u5206\u949f\uff0c\u662f\u6211\u7528 swagger \u8c03\u8bd5\u65f6\u5019\u7684\u7c97\u7565\u4f30\u8ba1\uff0c\u5b9e\u9645\u4e0a\u6bcf\u6b21\u4e0d\u6b62 2 \u5206\u949f\u3002<br \/>@skinny \u6ca1\u8bf4\u662f\u7529\u9505\u6846\u67b6\u7684\u554a\uff0c\u6211\u5c31\u662f\u53d1\u51fa\u6765\u8bf7\u6559\u5927\u5bb6\u7684\uff0c\u8fd9\u4e5f\u662f\u5fae\u8f6f\u6210\u719f\u6846\u67b6\uff0c\u6211\u77e5\u9053\u5b83 4000 \u6761\u5c31\u5361\u6210\u8fd9\u6837\uff0c\u6240\u4ee5\u624d\u6709\u7591\u60d1\u3002<br \/>@beginor \u5e94\u8be5\u4e0d\u662f\u6743\u9650\u95ee\u9898\uff0c\u56e0\u4e3a\u6211\u52a0\u4e86 where \u6761\u4ef6\uff0c\u8bbe\u7f6e\u6210 100 \u6761\u4ee5\u5185\u7684\u8fd4\u56de\u7684\u8bdd\uff0c\u5feb\u7684\u5f88\u3002<br \/>@quan01994 \u662f\u7528\u7684 ef \uff0c\u4f46\u662f\u8fd9\u662f\u6211\u7b2c\u4e00\u6b21\u7528 net core \u6846\u67b6\uff0c\u4e0d\u600e\u4e48\u719f\u6089\uff0c\u8bf7\u95ee\u4f60\u8d34\u7684\u8fd9\u4e2a\u662f\u5728 startup.cs \u6587\u4ef6\u91cc\u9762\u914d\u7f6e\u7684\u5417\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077728\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : INCerry <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u6d4b\u8bd5\u6027\u80fd\u5c31\u4e0d\u8981\u7528 DEBUG \u6a21\u5f0f\uff0c\u5207\u5230 Release \uff0c\u53e6\u5916 EF \u6846\u67b6\u662f\u9700\u8981\u9884\u70ed\u4e00\u4e0b\uff0c\u4f60\u53ef\u4ee5\u8bd5\u8bd5\u7b2c\u4e8c\u6b21\u3001\u7b2c\u4e09\u6b21\u5e94\u8be5\u5c31\u5feb\u4e86 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077729\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dawnh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u8bd5\u8bd5\u770b\u4e0d\u8981\u7528 ToListAsync()\uff0c\u800c\u662f ToList()\u4e4b\u540e\u518d\u8fd4\u56de\u7ed3\u679c\u3002\u5370\u8c61\u91cc\u770b\u5230\u8fc7\u4e00\u4e9b SO \u4e0a\u5173\u4e8e ToListAsync \u5728 EF \u83ab\u540d\u5176\u5999\u6162\u7684\u95ee\u9898\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077730\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : gowk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> ToList \u7684\u65f6\u5019\u8c03\u7528\u4e0b AsNoTracking \u8bd5\u8bd5 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077731\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : iold <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u5373\u4f7f\u7b2c\u4e00\u6b21\u8fd9\u70b9\u6570\u636e\u4e5f\u4e0d\u4f1a\u7528\u4f60\u8fd9\u4e48\u591a\u65f6\u95f4\u7684. \u770b\u4f60\u8fd9\u51e0\u884c\u4ee3\u7801,\u5982\u679c\u53ea\u8bfb,\u4f60\u53ef\u4ee5\u4f7f\u7528 AsNoTracking,\u5269\u4e0b\u7684\u81ea\u5df1\u770b\u5b98\u65b9\u6587\u6863\u5427, https:\/\/docs.microsoft.com\/zh-cn\/ef\/ef6\/fundamentals\/performance\/perf-whitepaper?redirectedfrom=MSDN <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077732\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u6709\u6ca1\u6709\u53ef\u80fd\u662f\u4f60\u7684\u54ea\u4e2a async \u64cd\u4f5c block \u4e86\uff1f<br \/>c#\u4e00\u4e2a gc \u8bed\u8a00 async \u505a\u7684\u96be\u7528\u7a0b\u5ea6\u90fd\u5feb\u8d76\u4e0a rust\/cpp \u4e86\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077733\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Removable <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges #18 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077734\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Removable \u8bed\u6cd5\u5565\u7684\u5148\u4e0d\u8bf4\uff0c\u6700\u4e3b\u8981\u7684\u662f colored function \u548c blocking \u7684\u95ee\u9898\u3002\u6709\u8fd0\u884c\u65f6\u7684\u8bed\u8a00 goroutine \u6216 actor \u90fd\u662f\u4e0d\u9519\u7684\u6a21\u5f0f\uff0ckotlin coroutine \u5b9e\u73b0\u7684 structured concurrency \u4e5f\u8fd8\u53ef\u4ee5\u3002\u76f8\u6bd4\u4e4b\u4e0b c# \u548c py \u7b49 (js \u7531\u4e8e\u5f02\u6b65\u5355\u7ebf\u7a0b\u7684\u539f\u56e0\u611f\u89c9\u4e0a\u8fd8\u597d) \u5c31\u6bd4\u8f83\u96be\u7528\u4e86\uff0c\u5f53\u7136 rust\/cpp \u8fd9\u4e9b\u65e0 gc \u8bed\u8a00\u8fd8\u6709\u5185\u5b58\u7ba1\u7406 pin \u4e4b\u7c7b\u7684\u95ee\u9898\u66f4\u52a0\u75db\u82e6\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077735\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ly841000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u9700\u8981\u5230\u5904\u63d2\u6869\u7684 goroutine \u5b9e\u73b0\u597d\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077736\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dawnh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @dawnh \u63a5\u8fd9\u6761\u3002<br \/>\u6309\u5370\u8c61\u91cc\u7684\u641c\u4e86\u4e00\u4e0b SO \u627e\u5230\u4ee5\u524d\u770b\u8fc7\u7684\u5e16\u5b50\u4e86\uff0c\u968f\u540e\u6307\u5411\u5230\u8fd9\u4e2a issue\uff1a https:\/\/github.com\/dotnet\/efcore\/issues\/18571<br \/>\u7b80\u5355\u6765\u8bf4\uff0c\u5982\u679c\u4f60\u662f\u7528\u4e86 ToListAsync()\uff0c\u4f7f\u7528 SqlClient \uff0c\u540c\u65f6\u8868\u7ed3\u6784\u91cc\u5b58\u5728 VARCHAR(MAX)\u8fd9\u6837\u7684\u53d8\u957f\u5217\uff0c\u5c31\u4f1a\u78b0\u5230\u8fd9\u4e2a\u6027\u80fd\u95ee\u9898\uff0c\u597d\u591a\u5e74\u8fd8\u6ca1\u4fee\uff0c\u56e0\u4e3a\u8981\u4fee\u590d\u5c31\u7275\u626f\u5230\u975e\u5e38\u5e95\u5c42\u7684\u5e93\u3002\u5f15\u7528 issue \u91cc\u7684\u4e00\u6761\u56de\u590d\uff1a<br \/> Workarounds: Don&#8217;t use VARCHAR(MAX) or don&#8217;t use async queries.<br \/>\u5e0c\u671b\u5bf9\u4f60\u6709\u5e2e\u52a9\u5427\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077737\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @ly841000 color blind function,\u4e0d\u7528\u62c5\u5fc3 blocking \uff0c\u63d2\u6869\u7528\u6237\u65e0\u611f\u77e5\uff0c\u4e0d\u9700\u8981\u7528\u6237\u5230\u5904\u63d2\u5165 async\/await \uff0c\u4f60\u5230\u8bf4\u8bf4\u54ea\u91cc\u4e0d\u597d\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077738\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u5c31\u5355\u51ed\u4e00\u6761\uff0c\u4f60\u4e0d\u80fd\u63a7\u5236\u534f\u7a0b\u8c03\u5ea6\uff0c\u8fd9\u70b9\u5c31\u5f88\u4e0d\u597d\u4e86\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077739\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 \u5728 gc \u8bed\u8a00\u4e2d\u4f60\u771f\u7684\u9700\u8981\u63a7\u5236 suspend point \u5417\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077740\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u63a7\u5236\u8c03\u5ea6\u548c GC \u6709\u4ec0\u4e48\u5173\u7cfb\uff1f\u63a7\u5236\u8c03\u5ea6\u7684\u4e3b\u8981\u76ee\u7684\u662f\u4e3a\u4e86\u63a7\u5236\u6267\u884c\u4e0a\u4e0b\u6587\uff0c\u4ee5\u8fbe\u5230\u4e00\u4e9b\u7279\u6b8a\u7684\u9700\u6c42\u3002\u4f8b\u5982\u590d\u6570\u7684\u72ec\u7acb\u5355\u7ebf\u7a0b\u6267\u884c\u73af\u5883\uff0c\u6216\u8005\u5e76\u53d1\u4e0d\u5e76\u884c\u7684\u6267\u884c\u73af\u5883\u7b49\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077741\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 \u56e0\u4e3a\u7528 gc \u8bed\u8a00\u4e00\u822c\u4e0d\u8ffd\u6c42 precise control \uff0c\u4e5f\u5c31\u6ca1\u6709\u5fc5\u8981\u663e\u5f0f\u6807\u8bc6 suspend point \u3002<br \/>goroutine \u786e\u5b9e\u4e0d\u80fd\u4e3a\u7279\u5b9a\u7684 task \u4e13\u95e8\u914d\u7f6e executor \uff0c\u4f46\u6211\u89c9\u5f97\u8fd9\u662f\u4e2a structural \u7684\u95ee\u9898\uff0c\u5373 spawn \u4e00\u4e2a task \u4e4b\u540e\u65e0\u6cd5\u8ffd\u8e2a\u8be5 task \u540e\u7eed spawn \u7684\u5176\u4ed6 task \u3002\u4e0e\u9690\u5f0f\u63d2\u5165\u51e0\u4e2a suspend point \u5173\u7cfb\u4e0d\u5927\u3002\u5982\u679c\u8981\u9632\u6b62\u8c03\u7528\u67d0\u4e9b\u7cfb\u7edf API \u7684\u65f6\u5019 goroutine \u88ab move \u7684\u8bdd runtime.LockOSThread \u5c31\u53ef\u4ee5\uff0c\u80fd\u8bf4\u8bf4\u6709\u4ec0\u4e48\u573a\u666f gc \u8bed\u8a00\u9700\u8981\u5173\u5fc3 task \u5177\u4f53\u600e\u6837\u8c03\u5ea6\u4e48\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077742\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u6240\u4ee5\u6211\u90fd\u8bf4\u4e86\u8fd9\u4e2a\u548c GC \u6839\u672c\u4e00\u70b9\u5173\u7cfb\u90fd\u6ca1\u6709\uff0c\u81ea\u5b9a\u4e49\u8c03\u5ea6\u5668\u7684\u76ee\u7684\u662f\u4e3a\u4e86\u63a7\u5236\u5e76\u884c\u548c\u5e76\u53d1\u3002\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u6211\u9700\u8981\u4e0d\u5b9a\u6570\u91cf\u7684\u7ec4\uff0c\u6bcf\u7ec4\u7684\u534f\u7a0b\u53ea\u5e76\u53d1\u4e0d\u5e76\u884c\uff0c\u4f46\u662f\u4e0d\u540c\u7ec4\u7684\u534f\u7a0b\u53ef\u4ee5\u5e76\u884c\u3002\u540c\u65f6\u6211\u5e0c\u671b\u4e00\u4e9b\u7ec4\u7684\u534f\u7a0b\u6267\u884c\u53ef\u4ee5\u91cd\u5165\uff0c\u53e6\u4e00\u4e9b\u4e0d\u80fd\u91cd\u5165\u3002Go \u91cc\u4f60\u65e0\u6cd5\u5728\u4e0d\u4f7f\u7528\u4efb\u4f55\u5305\u88c5\u7684\u60c5\u51b5\u4e0b\u505a\u5230\uff0c\u800c\u4f7f\u7528\u5305\u88c5\u5c31\u4f1a\u5927\u5e45\u964d\u4f4e\u6027\u80fd\u540c\u65f6\u4ee3\u7801\u96be\u770b\u96be\u5199\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077743\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : libasten <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @dawnh \u53d8\u957f\u7684\u5217\u6539\u6210\u56fa\u5b9a\u957f\u5ea6\u7684\uff0c\u4f1a\u4e0d\u4f1a\u597d\u70b9\u5462\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077744\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 gc \u8bed\u8a00\u7684\u4f7f\u7528\u573a\u666f\u4e0b\u4e00\u822c\u4e0d\u9700\u8981\u5173\u5fc3\u8fd9\u79cd\u95ee\u9898\uff0c\u5c24\u5176 go \u8fd9\u4e2a\u53f7\u79f0\u201c\u5927\u9053\u81f3\u7b80\u201d\u7684 opinionated \u8bed\u8a00\uff0c\u66f4\u662f\u51e0\u4e4e\u4e0d\u5728\u610f\u4efb\u4f55 corner case \u3002\u4e0d\u80fd\u4e3a\u7279\u5b9a task \u81ea\u5b9a\u4e49\u8c03\u5ea6\u5668\u662f go \u7684\u5e76\u53d1\u6a21\u578b\u7f3a\u4e4f structural \u7684\u95ee\u9898\uff0c\u800c\u4e0d\u662f green thread \u9690\u5f0f\u63d2\u5165 suspend point \u672c\u8eab\u7684\u95ee\u9898\u3002\u5982\u679c\u652f\u6301 scoped thread\/task \u7684\u8bdd\uff0c\u7406\u8bba\u4e0a\u4e5f\u662f\u53ef\u4ee5\u5b9e\u73b0\u7684\u3002\u6211\u53ea\u60f3\u5230\u4e86 FFI \u9700\u8981\u9632\u6b62 task \u88ab move \u5230\u5176\u4ed6 thread \uff08\u5e76\u4e14\u4e0e ffi \u7684\u4ea4\u4e92\u4e5f\u5e94\u8be5\u88ab\u5305\u88c5\u800c\u4e0d\u662f\u5f71\u54cd\u5230\u4e0a\u5c42\u7684\u884c\u4e3a\uff09\uff0c\u9664\u6b64\u4e4b\u5916\u8fd9\u5e94\u8be5\u5c5e\u4e8e\u8fd0\u884c\u65f6\u63d0\u4f9b\u7684\u62bd\u8c61\u5c42\uff0c\u5982\u679c\u6b63\u5e38\u5199\u4e1a\u52a1\u7684\u65f6\u5019\u9700\u8981\u5173\u5fc3\u90a3\u8fd9\u4e2a\u62bd\u8c61\u5c31\u662f leaky \u7684\u3002<br \/>\u6240\u4ee5\u6211\u60f3\u77e5\u9053\uff0c\u6709\u4ec0\u4e48\u5177\u4f53\u7684\uff0cgc \u8bed\u8a00\u7684\u4f7f\u7528\u573a\u666f\u4e0b\uff0c\u65e0\u6cd5\u5305\u88c5\u4e14\u9700\u8981\u5bf9\u67d0\u4e9b\u7279\u5b9a\u7684 task\u201c\u53ea\u5e76\u53d1\u4e0d\u5e76\u884c\u201d\u7684\u9700\u6c42\u5462\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077745\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shiweiliang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u8fd9\u548c controller \u751f\u6210\u7684\u65b9\u6cd5\u6709\u4ec0\u4e48\u5173\u7cfb\uff0c\u6162\u4f60\u770b\u4e00\u4e0b\u65e5\u5fd7\u4e0d\u5c31\u884c\u4e86\u5417\uff0c\u6846\u67b6\u8def\u7531\u6267\u884c\u6267\u884c\u5230\u7ed3\u675f \uff0cef core \u67e5\u8be2\u65e5\u5fd7\uff0c\u90fd\u6709\u7cbe\u786e\u7684\u65f6\u95f4\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077746\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leeg810312 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges await\/async \u662f\u4e1a\u5185\u516c\u8ba4\u6700\u4f73\u5f02\u6b65\u7f16\u7a0b\u6a21\u578b\uff0c\u65b0\u8001\u8bed\u8a00 js Python swift rust \u90fd\u5b9e\u73b0\u4e86\u8fd9\u4e2a\u8bed\u8a00\u7279\u6027\uff0c\u5b83\u53ea\u662f\u7f16\u7a0b\u6a21\u578b\uff0c\u4fbf\u5229\u5f02\u6b65\u5f00\u53d1\uff0c\u96be\u7528\u4ece\u4f55\u8bf4\u8d77\uff1f\u5b83\u5e76\u4e0d\u6539\u53d8\u5f00\u53d1\u5e73\u53f0\u672c\u8eab\u7684\u63a7\u5236\u8c03\u5ea6\uff0c\u4f60\u8981\u60f3\u81ea\u5df1\u63a7\u5236\u8c03\u5ea6\u4e0d\u7528\u5b83\u5c31\u597d\u4e86\u3002\u4f60\u6bd4\u8f83\u5f00\u53d1\u5e73\u53f0\u95f4\u5f02\u6b65\u7f16\u7a0b\u7684\u76f8\u540c\u4e0d\u540c\u5c31\u7b97\u4e86\uff0c\u8fd8\u628a\u8fd9\u79cd\u6bd4\u8f83\u548c await\/async \u7f16\u7a0b\u6a21\u578b\u597d\u4e0d\u597d\u7528\u8054\u7cfb\u8d77\u6765\uff0c\u4e0d\u4ec5\u57fa\u672c\u6982\u5ff5\u9519\u8bef\uff0c\u6bd4\u8f83\u672c\u8eab\u4e5f\u503c\u5f97\u5546\u69b7\uff0c\u5b8c\u5168\u5c31\u662f\u4f2a\u547d\u9898 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077747\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @leeg810312 \u6ca1\u6709\u94f6\u5f39\uff0c\u4e0d\u540c\u6a21\u578b\u90fd\u6709\u81ea\u5df1\u7684\u4f18\u52a3\uff0c\u6ca1\u6709\u54ea\u4e2a\u662f\u201c\u516c\u8ba4\u6700\u4f73\u201d\u3002<br \/>\u6211\u4e00\u76f4\u8bf4\u7684\u90fd\u662f\u201c\u5f02\u6b65\u7f16\u7a0b\u6a21\u578b\u201d\uff0c\u4ee5 goroutine\/fiber \u4e3a\u4ee3\u8868\u7684 green thread \uff0c\u4ee5 erlang \u4e3a\u4ee3\u8868\u7684 actor model \uff0c\u4ee5 trio \u548c kotlin coroutine \u4e3a\u4ee3\u8868\u7684 structural concurrency \uff0c\u4ee5\u53ca\u7ecf\u5178\u7684 async\/await \u3002<br \/>\u8bf4\u5b83\u96be\u7528\u4e3b\u8981\u4f53\u73b0\u5728\u4e24\u4e2a\u65b9\u9762\uff1a<br \/>1. colored function \u3002\u51e0\u4e4e\u6240\u6709\u7684\u5e93 \/\u51fd\u6570\u90fd\u8981\u5b9e\u73b0\u4e24\u904d\uff0csync \u548c async \u7684\u7248\u672c\u3002<br \/>2. blocking \u3002async context \u91cc\u8c03\u7528\u540c\u6b65\u64cd\u4f5c block \u6574\u4e2a runtime \u3002<br \/>\u5f53\u7136\u8fd8\u6709\u4ee3\u7801\u91cc\u5230\u5904\u90fd\u662f async\/await \u5173\u952e\u5b57\uff0c\u4e0d\u8fc7\u8fd9\u4e2a\u5c5e\u4e8e\u4e2a\u4eba\u504f\u597d\u3002<br \/>\u4f60\u8981\u8bf4\u4e0d\u540c\u5e73\u53f0\u7684\u5177\u4f53\u5b9e\u73b0\uff0c\u8fd8\u6709 future based (do nothing until awaited) \u548c task based (spawned after creating)\u7684\u533a\u522b\u3002\u65e0\u8fd0\u884c\u65f6\u7684\u8bed\u8a00\u6ca1\u6cd5\u4f7f\u7528 green thread \uff0c\u6709 gc \u7684\u8bed\u8a00\uff08\u5c24\u5176 Python \u7684 asyncio \u9009\u62e9\u524d\u8005\uff09\u7528 async\/await \u5e76\u4e0d\u80fd\u8bf4\u662f\u826f\u597d\u7684\u9009\u62e9\u3002js \u56e0\u4e3a\u6700\u5f00\u59cb\u5c31\u662f\u5f02\u6b65\u5355\u7ebf\u7a0b\u964d\u4f4e\u4e86\u590d\u6742\u5ea6\u540c\u65f6\u4e5f\u786e\u5b9e\u4f18\u4e8e\u56de\u8c03\u6a21\u5f0f\u3002Rust \u7684\u5b9e\u73b0\u8fd8\u76f8\u5f53\u4e0d\u5b8c\u5584\uff0c\u5b9e\u73b0\u81ea\u5df1\u7684 future \u8fd8\u9700\u8981 unsafe ( pin projection)\u3002Swift \u4e0d\u4e86\u89e3\u5c31\u4e0d\u8bc4\u4ef7\u4e86\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077748\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : userforg2021 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u5982\u679c.net \u662f\u8c37\u6b4c\u51fa\u7684\uff0c\u90a3\u5e94\u8be5\u4f1a\u66f4\u597d\u7528 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077749\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fanshaohua <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @userforg2021 \u4e0d\u77e5\u9053\u4f60\u770b\u8fc7 EF core \u7684\u6587\u6863\u4e48\uff1f\u90fd\u5728 github \u4e0a\uff0c\u901a\u8fc7\u5f00\u6e90\u793e\u533a\u6765\u7ef4\u62a4\u7684.<br \/>\u5bf9\u6bd4 Facebook \u548c Google \u7684\u6587\u6863\uff0c\u5fae\u8f6f\u5f3a\u592a\u591a\u4e86&#8230;<br \/>\u626f\u8fdc\u4e86&#8230;<br \/>https:\/\/docs.microsoft.com\/en-us\/ef\/core\/<br \/>@libasten \u8fd8\u662f\u5148\u770b\u770b EF core \u6253\u5370\u51fa\u6765\u7684\u65e5\u5fd7\uff0c\u786e\u8ba4\u4e00\u4e0b\u662f\u4e0d\u662f\u67e5\u8be2\u6162\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077750\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leeg810312 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u5927\u591a\u6570\u5f00\u53d1\u5e73\u53f0\u90fd\u662f\u540c\u6b65\u5f02\u6b65\u90fd\u6709\uff0c\u5f53\u7136\u8981\u5b9e\u73b0 2 \u79cd\uff0c\u5426\u5219\u600e\u4e48\u533a\u5206\uff0c\u8fd9\u4e5f\u80fd\u7b97\u7f3a\u70b9\uff1f\u5f02\u6b65\u4e0a\u4e0b\u6587\u8c03\u7528\u540c\u6b65\u65b9\u6cd5\u4f1a\u963b\u585e\u548c async\/await \u6709\u4ec0\u4e48\u5173\u7cfb\uff1f\u524d\u9762\u6211\u5f3a\u8c03\u4e86\uff0casync await \u662f\u7528\u6765\u7b80\u5316\u5f02\u6b65\u7f16\u7a0b\u6a21\u578b\uff0c\u4f7f\u6e90\u4ee3\u7801\u7684\u903b\u8f91\u7b80\u660e\u6e05\u6670\uff0c\u6613\u4e8e\u9605\u8bfb\u548c\u7ef4\u62a4\uff0c\u5e76\u6ca1\u6709\u6539\u53d8\u5f00\u53d1\u5e73\u53f0\u5b9e\u73b0\u5f02\u6b65\u7f16\u7a0b\u7684\u63a7\u5236\u8c03\u5ea6\uff0c\u4f60\u975e\u8981\u628a\u7f16\u7a0b\u6a21\u578b\u968f\u610f\u6269\u5927\u89e3\u91ca\uff0c\u628a\u8bed\u8a00\u7279\u6027\u548c\u80cc\u540e\u7684\u5b9e\u73b0\u6df7\u4e3a\u4e00\u8c08\u3002\u5404\u4e2a\u5f00\u53d1\u5e73\u53f0\u5b9e\u73b0\u7684\u6548\u679c\u5404\u6709\u597d\u574f\uff0c\u4f46\u540c\u6b65\u5f02\u6b65\u90fd\u6709\u7684\u5f00\u53d1\u5e73\u53f0\u91cc\uff0casync\/await \u663e\u7136\u662f\u6700\u597d\u7684\u5f02\u6b65\u7f16\u7a0b\u6a21\u578b\uff0c\u5426\u5219\u4e0d\u4f1a\u5728 C#\u9996\u521b\u540e\u88ab\u591a\u4e2a\u65b0\u65e7\u8bed\u8a00\u5b66\u4e86\u53bb\u3002\u4f60\u53ea\u662f\u770b\u7740\u597d\u50cf\u77e5\u9053\u5f88\u591a\u77e5\u8bc6\u70b9\uff0c\u4f46\u5b9e\u9645\u8fde\u57fa\u672c\u6982\u5ff5\u90fd\u641e\u4e0d\u6e05\uff0c\u53ea\u4f1a\u7ffb\u6765\u8986\u53bb\u626f\u51e0\u4e2a\u540d\u8bcd\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077751\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @leeg810312 <br \/>\u6bd4\u5982\u6211\u8981\u5199\u4e00\u4e2a redis client \uff0c\u9700\u8981\u7528\u540c\u6b65 IO \u7684 API \u548c\u5f02\u6b65 IO \u7684 API \u5206\u522b\u5b9e\u73b0\u4e00\u904d\uff0c\u4ee3\u7801\u903b\u8f91\u5b8c\u5168\u4e00\u6837\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u53ea\u5199\u4e00\u904d\uff1f\u9664\u4e86\u5e95\u5c42\u8bed\u8a00\u6ca1\u6709\u5fc5\u8981\u540c\u6b65\u5f02\u6b65\u90fd\u6709\uff0c\u50cf go \u3001erlang \u53ef\u4ee5\u5168\u90fd\u662f\u5f02\u6b65\uff0c\u5f02\u6b65\u4e0d\u589e\u52a0\u4efb\u4f55\u989d\u5916\u7684\u590d\u6742\u5ea6\u548c\u5b66\u4e60\u6210\u672c\u3002green thread \u4e5f\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898\u3002<br \/>\u81f3\u4e8e\u771f\u6b63\u9700\u8981\u5168\u90fd\u6709\u7684\uff0c\u53ef\u4ee5\u4e86\u89e3\u4e00\u4e0b zig \u7684 color blind async \uff0c\u53ea\u9700\u8981\u5b9e\u73b0\u4e00\u904d\uff0c\u540c\u6b65 context \u4e0b async \u81ea\u52a8\u53d8\u6210 noop \u3002<br \/>\u5f02\u6b65 context \u8c03\u7528\u540c\u6b65\u65b9\u6cd5\u5bfc\u81f4\u963b\u585e\u5c31\u662f async\/await \u6a21\u578b\u7684\u7f3a\u9677\u3002\u4f60\u8981\u8bf4\u662f\u5b9e\u73b0\u7684\u95ee\u9898\uff0c\u4f60\u5230\u8bf4\u8bf4\u54ea\u4e2a async\/await \u7684\u5b9e\u73b0\u53ef\u4ee5\u8c03\u7528\u540c\u6b65\u65b9\u6cd5\u800c\u4e0d\u963b\u585e\uff1f<br \/>\u8d34\u91cc\u8ba8\u8bba\u7684\u4e00\u76f4\u90fd\u662f programming pattern \uff0c\u6839\u672c\u6ca1\u6709\u63d0\u5230\u8fc7 scheduler\/runtime \u5177\u4f53\u5b9e\u73b0\u7684\u95ee\u9898\uff0c\u4e0a\u9762\u8ba8\u8bba\u7684\u4e5f\u662f task \u5177\u6709 structural \u7684\u7279\u6027(await task will resume after all sub task awaited finished)\u4ece\u800c\u53ef\u4ee5\u66f4\u7ec6\u7c92\u5ea6\u7684\u63a7\u5236\u4e0d\u540c\u7684 task \u7531\u4e0d\u540c\u7684 executor \uff08\u5355\u7ebf\u7a0b \/\u591a\u7ebf\u7a0b\uff09\u6267\u884c\u3002\u8fd9\u786e\u5b9e\u662f async\/await \u6bd4 goroutine \u7684\u4f18\u70b9\uff0c\u4f46\u5982\u679c green thread \u5f15\u5165\u4e86 structural concurrency \u4e5f\u662f\u4e00\u6837\u53ef\u4ee5\u5b9e\u73b0\u7684\u3002<br \/>async\/await \u5728\u8fc7\u53bb\u4e00\u6bb5\u65f6\u95f4\u786e\u5b9e\u975e\u5e38\u6d41\u884c\uff0c\u4f46\u6ca1\u6709\u4efb\u4f55\u8303\u5f0f\u53ef\u4ee5\u9002\u7528\u4e8e\u6240\u6709\u7684\u9700\u6c42\uff0c\u6ca1\u6709\u94f6\u5f39\uff0c\u81ea\u7136\u6ca1\u6709\u54ea\u4e2a\u80fd\u6210\u4e3a\u662f\u201c\u6700\u597d\u201d\u3002<br \/>\u4f55\u51b5 async\/await \u6709\u5f88\u591a\u95ee\u9898\u548c\u6279\u8bc4\uff0c \u5982 https:\/\/journal.stuffwithstuff.com\/2015\/02\/01\/what-color-is-your-function\/ \uff0chn \u4e0a\u6bcf\u51e0\u4e2a\u6708\u90fd\u4e0a\u4e00\u6b21\u5934\u6761\uff0c\u6ca1\u770b\u8fc7\u53ef\u4ee5\u770b\u4e00\u4e0b\u3002<br \/>\u5efa\u8bae\u591a\u4e86\u89e3\u4e00\u4e9b\u4e0d\u540c\u7684\u8bed\u8a00\u548c\u8303\u5f0f\uff0cC#\u662f\u4e00\u95e8\u4f18\u79c0\u7684\u8bed\u8a00\uff0c\u4f46\u5b83\u4e5f\u6709\u5386\u53f2\u7684\u5c40\u9650\u6027\u3002\u5f88\u591a\u5f53\u65f6\u7684\u8bbe\u8ba1\u4f46\u82e5\u5e72\u5e74\u540e\u53d1\u73b0\u6709\u95ee\u9898\u7684\uff08\u6bd4\u5982 void \u4e0d\u80fd\u4f5c\u4e3a\u6cdb\u578b\u53c2\u6570\uff09\u3002erlang\/elixir \u53ef\u4ee5\u5199\u51fa\u5929\u7136\u5206\u5e03\u5f0f\u7684\u7a0b\u5e8f\uff0cactor model \u5e7f\u6cdb\u5728 OOP \u4e2d\u4f7f\u7528\uff0cgreen thread \u6781\u5927\u7684\u7b80\u5316\u4e86\u5f02\u6b65 IO \u7684\u590d\u6742\u5ea6\uff0c\u76f4\u63a5\u7f16\u5199\u540c\u6b65\u4ee3\u7801\u5e76\u83b7\u5f97\u5f02\u6b65 IO \u7684\u5e76\u53d1\u6027\u80fd\u63d0\u5347 nearly for free \u3002structural concurrency \u662f trio \u7684\u4f5c\u8005\u63d0\u51fa\u7684\uff0c\u8981\u6c42\u4efb\u4f55\u51fd\u6570 spawn \u7684 task \u5fc5\u987b\u5728\u51fd\u6570\u8fd4\u56de\u524d\u7ed3\u675f\uff0c\u5e0c\u671b\u50cf\u73b0\u4ee3\u7f16\u7a0b\u8bed\u8a00\u7684\u63a7\u5236\u6d41\u53d6\u4ee3 goto \u4e00\u6837\u53d6\u4ee3\u5f53\u524d spawn \u7684 task \u53ef\u4ee5\u81ea\u7531\u8fd0\u884c for any time \uff0c\u8be6\u7ec6\u9605\u8bfb https:\/\/vorpus.org\/blog\/notes-on-structured-concurrency-or-go-statement-considered-harmful\/<br \/>go \u91cc\u7684 errgroup \u548c rust \u7684 scoped_thread \u90fd\u662f\u8be5\u8303\u5f0f\u7684\u4f53\u73b0\uff0c\u5e76\u4e14\u88ab kotlin \u4f5c\u4e3a\u4e86\u5b98\u65b9\u7684\u534f\u7a0b\u8303\u5f0f\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077752\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ragnaroks <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> EF \u9700\u8981 .AsNoTracking() \u5426\u5219\u6781\u5927\u5f71\u54cd\u6027\u80fd\uff0c\u4e0d\u8fc7\u5c31\u7b97\u8ddf\u8e2a\u4e86\u4e5f\u4e0d\u81f3\u4e8e\u624d 4000 \u6761\u6570\u636e\u8981 2 \u5206\u949f\uff0c\u6211\u66f4\u503e\u5411\u4e8e\u6570\u636e\u5e93\u914d\u7f6e\u6709\u8bef\u3001\u6570\u636e\u5e93\u673a\u5668\u6027\u80fd\u53d7\u9650\u3001EF \u6216\u6846\u67b6\u751a\u81f3 SqlServer \u672c\u8eab\u6709 BUG \uff1b\u4e8b\u5b9e\u4e0a dotnet framework 4.5.2 \u66fe\u51fa\u73b0\u8fc7\u4e25\u91cd\u7684\u65b9\u6cd5\u91cd\u8f7d BUG \u3002<br \/>\u5728 csharp \u677f\u5757\u5439 golang \u7684\u5efa\u8bae\u76f4\u63a5\u5c4f\u853d\uff0c\u8fde java \u90fd\u4e0d\u5982\u7684\u8bed\u8a00\u8d76\u7d27\u53bb c\/cpp \u793e\u533a\u5439\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077753\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : userforg2021 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @fanshaohua \u547d\u4e2d\u53cb\u519b <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077754\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : userforg2021 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u6211\u89c9\u5f97\u67d0\u4e9b\u4eba\u5427\uff0c\u4e0d\u61c2\u5c31\u4e0d\u8981\u4e71\u8bf4\u3002\u3002\u3002<br \/>asp.net core \u73b0\u5728\u9ed8\u8ba4\u662f\u6ca1\u6709\u540c\u6b65\u4e0a\u4e0b\u6587\u7684\u3002\u3002\u3002<br \/>&#8220;async context \u91cc\u8c03\u7528\u540c\u6b65\u64cd\u4f5c block \u6574\u4e2a runtime&#8221;&#8230;\u5b8c\u5168\u770b\u4e0d\u61c2\u3002\u3002\u3002\u963b\u585e\u5927\u6982\u662f\u5728\u5f53\u524d\u6709\u540c\u6b65\u4e0a\u4e0b\u6587\u7684\u60c5\u51b5\u4e0b\uff0c\u8c03\u7528 Task \u7684\u540c\u6b65\u83b7\u53d6\u7ed3\u679c\u7684\u65b9\u6cd5\uff0c\u800c\u8fd9\u4e2a Task \u7684\u540c\u6b65\u4e0a\u4e0b\u6587\u548c\u5f53\u524d\u662f\u540c\u4e00\u4e2a\u624d\u4f1a\u963b\u585e\u3002\u3002\u3002<br \/>\u800c\u4e14\u963b\u585e\u4e5f\u53ea\u662f\u5f53\u524d\u7ebf\u7a0b\uff0c\u963b\u585e\u6574\u4e2a runtime \uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f\uff1f<br \/>\u53e6\u5916\uff0c\u592a\u957f\u4e0d\u770b\uff0c\u6ca1\u6709\u4efb\u4f55\u53c2\u8003\u4ef7\u503c <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077755\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : encro <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u7b80\u5355\u7684\u5b9a\u4f4d\u65b9\u6cd5\uff1a<br \/>1 \uff0c\u6253\u5f00\u6570\u636e\u5e93\uff0cshow processlist \uff0c\u770b\u770b db \u8bed\u53e5\u7684\u8fd0\u884c\u72b6\u6001\uff0c\u662f\u4e0d\u662f\u5728 send data \u3002\u5982\u679c\u662f\u90a3\u4e48\u5c31\u662f\u6570\u636e\u5e93\u5230 web \u670d\u52a1\u5668\u6162\uff0c\u6216\u8005\u6570\u636e\u96c6\u5927\u3002\uff08\u5e26\u5bbd\uff0c\u8d70\u4e86\u5916\u7f51\uff09<br \/>2 \uff0c\u5982\u679c sql \u6570\u636e\u5e93\u6ca1\u95ee\u9898\uff0c\u90a3\u4e48\u53ef\u80fd\u662f\u8f6c\u5bf9\u8c61 json \u6bd4\u8f83\u5927\uff0c\u5bf9\u8c61\u8f6c json \u6bd4\u8f83\u6162\uff08\u53ef\u4ee5\u7f13\u5b58\u4e0b\u518d\u6d4b\u8bd5\uff09\uff1b<br \/>3 \uff0c\u5982\u679c\u53ea\u67e5 100 \u6761\uff0c\u8fd8\u662f\u90a3\u4e48\u6162\u5417\uff1f<br \/>4 \uff0c\u662f\u4e0d\u662f\u65f6\u95f4\u82b1\u5728 dnslookup \u4e4b\u7c7b\u7684\u4e86\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077756\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : libasten <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @quan01994 #12 <br \/>@fanshaohua #35<br \/>\u6253\u5370\u4e86 sql \uff0c\u786e\u5b9e\u4e0d\u662f\u67e5\u8be2\u5361\u7684\uff0c\u67e5\u8be2 2ms \u5c31\u6267\u884c\u5b8c\u4e86\uff0c\u5728\u8fd9\u4e2a api \u7684 return \u8bed\u53e5\u6267\u884c\u4e2d\uff0c\u56de\u53bb\u904d\u5386\u6a21\u578b\u7ed3\u6784\u5bfc\u81f4\u7684\uff1f\u56e0\u4e3a\u7684 F10 \u770b\u4e86\uff0c\u4e00\u76f4\u5728\u5faa\u73af\u6267\u884c\u6a21\u578b\u5c5e\u6027\u4e2d\u7684 get \u65b9\u6cd5\u3002<br \/>\u6211\u6539\u4e86\u4e00\u4e0b\u4ee3\u7801\uff0c\u7528\u4e00\u4e2a list \u5bf9\u8c61\u6682\u5b58\u67e5\u8be2\u8fd4\u56de\u5bf9\u8c61\uff0c\u83b7\u53d6\u5217\u8868\u5bf9\u8c61\u7684\u8bed\u53e5\u77ac\u95f4\u5b8c\u6210\uff0c\u4f46\u662f\u4e0b\u4e00\u53e5 return \u8bed\u53e5\u662f\u4f1a\u5361\u4f4f\u7684\uff0c\u8bf7\u95ee\u8fd9\u4e2a\u95ee\u9898\u600e\u4e48\u6392\u67e5\u5462\uff1f<br \/>&#8220;`<br \/>[HttpGet]<br \/>public async Task&lt;ActionResult&lt;IEnumerable&lt;ZLJBXXItem&gt;&gt;&gt; GetZLJBXXItem()<br \/>{<br \/> List&lt;ZLJBXXItem&gt; lst = await _context.ZLJBXXItem.ToListAsync(); \/\/\u8fd9\u53e5\u77ac\u95f4\u8fd4\u56de lst \u503c<br \/> return lst; \/\/ \u5361\u987f\u5728\u8fd9\u53e5<br \/>}<br \/>&#8220;` <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077757\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : poorcai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u4e3b\u662f\u4e0d\u662f\u505a\u533b\u7597\u7684\uff1f\u4e0d\u4f1a\u662f\u676d\u5dde\u7684\u5427\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077758\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : quan01994 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @libasten IEnumerable \u6539\u6210 list \u8bd5\u8bd5\u770b\uff0c\u4f60\u8fd9\u6837\u8fd4\u56de\u7684\u662f\u4e00\u4e2a\u53ef\u4ee5\u8fed\u4ee3\u7684\u5bf9\u8c61\uff0c <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077759\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Itoktsnhc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u611f\u89c9\u662f ActionResult \u7684\u95ee\u9898?<br \/>&#8220;` c#<br \/> [HttpGet(Name = &#8220;GetWeatherForecast&#8221;)]<br \/> public async Task&lt;ActionResult&lt;IEnumerable&lt;WeatherForecast&gt;&gt;&gt; Get()<br \/> {<br \/> await Task.CompletedTask;<br \/> var list = Enumerable.Range(1, 1000).Select(index =&gt; new WeatherForecast<br \/> {<br \/> Date = DateTime.Now.AddDays(index),<br \/> TemperatureC = Random.Shared.Next(-20, 55),<br \/> Summary = Summaries[Random.Shared.Next(Summaries.Length)]<br \/> }).ToList();<br \/> return list;<br \/> }<br \/>&#8220;`<br \/>\u8fd9\u6837\u7684\u4ee3\u7801\u4e5f\u4f1a\u5361\u4e00\u4f1a <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077760\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Itoktsnhc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> sorry \u63d0\u4f9b\u9519\u4e86 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077761\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : quan01994 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u4f60\u8fd9\u6837\u8fd4\u56de\u53ea\u662f\u4e3a\u4e86 swagger \u53ef\u4ee5\u627e\u5230\u8fd4\u56de\u7c7b\u578b\uff0c\u53ef\u4ee5\u5c55\u793a\u51fa\u6765<br \/>\u6211\u4e00\u822c\u90fd\u662f\u8fd9\u6837\u5199\u7684<br \/> [HttpGet(&#8220;List&#8221;)]<br \/> [ProducesResponseType(typeof(List&lt;string&gt;),StatusCodes.Status200OK)]<br \/> [ProducesResponseType(StatusCodes.Status400BadRequest)]<br \/> [ProducesResponseType(StatusCodes.Status403Forbidden)]<br \/> public async Task&lt;IActionResult&gt; List()<br \/> {<br \/> var list = new List&lt;string&gt;();<br \/> return Ok(list);<br \/> }<br \/>\u4f60\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b \u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077762\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Itoktsnhc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> Swagger \u7684\u4e24\u5206\u949f\u6709\u6ca1\u6709\u53ef\u80fd\u662f Swaggerui \u6e32\u67d3\u6bd4\u8f83\u6162? \u5b9e\u9645\u7684\u7f51\u7edc\u8bf7\u6c42\u4e5f\u540c\u6837\u7684\u6162\u5417\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077763\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : quan01994 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> JSON \u5e8f\u5217\u5316\u65b9\u6cd5\uff0c\u9ed8\u8ba4\u7528\u7684\u662f\u5fae\u8f6f\u5b98\u65b9\u7684 \u3002\u867d\u7136\u6309\u7167\u5fae\u8f6f\u5b98\u65b9\u7684\u6587\u6863\uff0c\u5e8f\u5217\u5316\u786e\u5b9e\u6bd4 Newtonsoft.Json \u5feb\uff0c\u4f46\u662f\u4e0d\u6392\u9664\u4f60\u6709\u4ec0\u4e48\u7279\u6b8a\u7684\u5730\u65b9\uff0c \u6240\u4ee5\uff0c\u66ff\u6362\u4e00\u4e0b\u9ed8\u8ba4 Json \u5e8f\u5217\u5316\u65b9\u6cd5 \u7528 Newtonsoft.Json \u8bd5\u8bd5\u770b \u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077764\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0o0o0o0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u201cblock \u6574\u4e2a runtime\u201d<br \/>\u6211\u7684\u7406\u89e3\u662f async \u5176\u5b9e\u53ea\u662f task \u7684\u8bed\u6cd5\u7cd6\uff0c\u6700\u7ec8\u8fd8\u662f\u4f1a\u8ffd\u6eaf\u5230\u4e00\u4e2a\u7ebf\u7a0b\u3002<br \/>\u7528 await \u7684\u8bdd\u5c31\u662f\u628a\u5f02\u6b65\u53d8\u6210\u540c\u6b65\u7684\uff0c\u5e76\u4e14\u4e0d\u4f1a\u5bfc\u81f4\u56e0\u4e3a\u7b49\u5f85\u7ebf\u7a0b\u6267\u884c\u800c\u963b\u585e\u5f53\u524d\u7ebf\u7a0b\uff08\u7b49\u5f85\u65f6\u4f1a\u91ca\u653e cpu \u8d44\u6e90\uff09\u3002<br \/>\u6240\u4ee5\u8bf4\u6700\u540e\u4e0d\u5e94\u8be5\u662f\u963b\u585e\u5f53\u524d\u7684\u7ebf\u7a0b\u5417\uff0c\u800c\u4e14\u540c\u6b65\u65b9\u6cd5\u672c\u8eab\u5c31\u5e94\u8be5\u963b\u585e\u7ebf\u7a0b\u554a\u3002\u3002\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077765\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u4e3a\u5565\u4f60\u975e\u8981\u5f80 GC \u4e0a\u62d0\u5462\uff0c\u81ea\u5b9a\u4e49\u8c03\u5ea6\u548c GC \u5230\u5e95\u6709\u4ec0\u4e48\u5173\u7cfb\u3002\u4f60\u8981\u573a\u666f\uff0c\u90a3\u4e00\u4e2a\u5f88\u7b80\u5355\u7684\uff0c\u623f\u95f4\u7c7b\u6e38\u620f\uff0c\u6211\u5e0c\u671b\u623f\u95f4\u5185\u7684\u8bf7\u6c42\u90fd\u662f\u5355\u7ebf\u7a0b\u5904\u7406\uff0c\u4f46\u662f\u623f\u95f4\u5185\u5728\u5904\u7406\u8017\u65f6\u7684\u5f02\u6b65\u64cd\u4f5c\u7684\u65f6\u5019\uff0c\u6211\u4efb\u7136\u5e0c\u671b\u8fd9\u4e2a\u623f\u95f4\u80fd\u5904\u7406\u53ea\u8bfb\u8bf7\u6c42\u3002\u8fd9\u4e0d\u5c31\u662f\u5e76\u53d1\u4e0d\u5e76\u884c\uff0c\u5141\u8bb8\u91cd\u5165\u3002\u5176\u5b83\u7684\u573a\u666f\u633a\u591a\u7684\uff0c\u518d\u6bd4\u65b9\u8bf4 actor \u6a21\u578b\u90a3\u5c31\u662f\u5178\u578b\u7684\u8fd9\u4e2a\u6837\u7684\u573a\u666f\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077766\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leeg810312 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges erlang go \u90fd\u662f\u9762\u5411\u5e76\u53d1\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u548c\u540c\u6b65\u5f02\u6b65\u90fd\u6709\u7684\u5f00\u53d1\u5e73\u53f0\u6bd4\u8f83\uff0c\u4f60\u5c31\u50cf\u5728\u62ff OLTP \u548c OLAP \u6bd4\u8f83\uff0c\u8bf4 OLTP \u4e3a\u4ec0\u4e48\u6ca1\u6709 OLAP \u8bfb\u6027\u80fd\u597d\u3002<br \/>\u5173\u4e8e\u5f02\u6b65\u540c\u6b65\u963b\u585e\uff0c\u53ea\u8bf4.net \uff0c\u4ee5\u524d\u7684 .net \u7248\u672c\u6709\u540c\u6b65\u4e0a\u4e0b\u6587\u8bbe\u8ba1\uff0c\u4f46 .net core \u4ee5\u540e\u7684\u7248\u672c\u5c31\u4e0d\u662f\u8fd9\u4e2a\u8bbe\u8ba1\u4e86\uff0c\u524d\u9762\u6709\u4eba\u8bf4\u4e86\uff0c\u5f02\u6b65\u4efb\u52a1\u8c03\u7528\u540c\u6b65\u65b9\u6cd5\u53ea\u963b\u585e\u5f53\u524d\u4efb\u52a1\uff0c\u54ea\u6709\u963b\u585e\u6574\u4e2a\u5e94\u7528\u7684\uff0c\u800c\u4e14\u5b9e\u73b0\u53d8\u4e86 async\/await \u7f16\u7a0b\u6a21\u578b\u5374\u6ca1\u6709\u53d8\u3002\u5373\u4f7f\u5176\u4ed6\u5f00\u53d1\u5e73\u53f0\u6709\u4f60\u8bf4\u7684\u8fd9\u79cd\u60c5\u51b5\uff0c\u4e5f\u6b63\u8bf4\u660e\u548c\u5b9e\u73b0\u6709\u5173\uff0c\u548c async\/await \u6ca1\u6709\u5173\u7cfb\u3002<br \/>\u53e6\u5916\uff0c\u4f60\u8ba4\u53ef\u7684 Kotlin \u4e5f\u6709 async\/await \uff0c\u4f46\u4e0d\u5f71\u54cd\u5b83\u6709\u4e0d\u540c\u7684\u8c03\u5ea6\u5668\uff0c\u5e76\u4e14\u4e0d\u540c\u7684\u7f16\u8bd1\u76ee\u6807\u8fd8\u7528\u4e0d\u540c\u7684\u5b9e\u73b0\u3002\u660e\u663e\uff0c\u597d\u574f\u4e0d\u8c08\uff0casync\/await \u7f16\u7a0b\u6a21\u578b\u53ef\u4ee5\u6709\u5404\u79cd\u5b9e\u73b0\uff0c\u4f46\u4f60\u59cb\u7ec8\u6a21\u7cca \u7f16\u7a0b\u6a21\u578b\u548c\u5b9e\u73b0 \u7684\u754c\u9650\uff0c\u5c06\u5b83\u4eec\u6df7\u5728\u4e00\u8d77\u3002<br \/>\u5efa\u8bae\u6559\u80b2\u522b\u4eba\u524d\u5148\u81ea\u5df1\u5398\u6e05\u6982\u5ff5\uff0c\u8fd8\u6709\u4f60\u7684\u56de\u590d\u4e2d\u90a3\u4e48\u591a\u540d\u8bcd\u4e0d\u662f\u4e13\u6709\u8bcd\u6c47\u90fd\u662f\u6709\u4e2d\u6587\u7ffb\u8bd1\u7684\uff0c\u6211\u548c\u9999\u6e2f\u5ba2\u6237\u8c08\u6280\u672f\u95ee\u9898\u90fd\u4e0d\u4f1a\u5939\u8fd9\u4e48\u591a\u82f1\u6587\u8bcd\u6c47\uff0c\u662f\u4e0d\u662f\u4f60\u4e2d\u6587\u4e0d\u592a\u597d\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077767\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0o0o0o0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @0o0o0o0 \u770b\u4e86\u4e00\u4e0b\u8d44\u6599\uff0c\u539f\u6765\u662f\u5728\u4e00\u4e2a\u53ea\u80fd\u5355\u7ebf\u7a0b\u7684\u4e0a\u4e0b\u6587\u4e2d\uff0c\u4ee5\u963b\u585e\u7684\u65b9\u5f0f\u8c03\u7528\u5f02\u6b65\u65b9\u6cd5\uff0c\u4f1a\u5bfc\u81f4\u5f02\u6b65\u65b9\u6cd5\u4e2d\u7684\u7ebf\u7a0b\u7ed3\u675f\u540e\u65e0\u6cd5\u8fd4\u56de\u7ed3\u679c\uff0c\u56e0\u4e3a\u8fd4\u56de\u7ed3\u679c\u9700\u8981\u5f53\u524d\u7684\u4e0a\u4e0b\u6587\u7ee7\u7eed\u8fd0\u884c\uff0c\u800c\u4e0a\u4e0b\u6587\u53c8\u56e0\u4e3a\u7b49\u5f85\u7ed3\u679c\u88ab\u963b\u585e\u4e86\uff0c\u4ece\u800c\u9677\u5165\u6b7b\u9501\u3002\u5982\u679c\u4e0a\u4e0b\u6587\u5141\u8bb8\u591a\u7ebf\u7a0b\u5219\u4e0d\u4f1a\u53d1\u751f\u8fd9\u4e2a\u4e8b\u60c5\uff0c\u6240\u4ee5\u8bf4\u6700\u597d\u5c31\u662f\u4e0d\u8981\u4f7f\u7528\u963b\u585e\u65b9\u5f0f\u8c03\u7528\u5f02\u6b65\u65b9\u6cd5\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077768\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hnbcinfo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u6211\u6000\u7591\u4f60\u5b9e\u4f53\u91cc\u6709\u5faa\u73af\u5f15\u7528\u3002\u4e0d\u8981\u8fd4\u56de\u6574\u4e2a\u5b9e\u4f53\uff0c\u8bd5\u8bd5\u7528 DTO \uff0c\u53ea\u8fd4\u56de\u7528\u5230\u7684\u6570\u636e\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077769\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : neilq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @userforg2021 \u4ed6\u4eec\u5199\u7684\u65f6\u5019\u4e00\u5b9a\u89c9\u5f97\u81ea\u5df1\u77e5\u8bc6\u5f88\u6e0a\u535a <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077770\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : forgottencoast <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @leeg810312 \u6211\u60f3\u7ed9\u4f60 1000000 \u4e2a\u611f\u8c22\uff0c\u5f3a\u884c\u5939\u82f1\u6587\u7684\u4e2d\u6587\u770b\u7684\u60f3\u5410\uff0c\u6709\u672c\u4e8b\u5168\u7528\u82f1\u6587\u554a\uff0c\u8fd9\u91cc\u7684\u4eba\u53c8\u4e0d\u662f\u770b\u4e0d\u61c2\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077771\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 \u6211\u8bf4 gc \u662f\u56e0\u4e3a gc \u8bed\u8a00\u7684\u5e94\u7528\u573a\u666f\u4e3b\u8981\u662f\u5199\u4e1a\u52a1\u548c\u5e94\u7528\uff0c\u53ea\u8981\u5728\u8be5\u6267\u884c\u7684\u65f6\u5019\u6267\u884c\u5c31\u597d\uff0c\u4e0d\u5173\u5fc3\u5177\u4f53\u5982\u4f55\u8c03\u5ea6\u3002\u540c\u65f6 gc \u8bed\u8a00\u4e5f\u4e0d\u5728\u610f\u4e00\u4e9b\u5c0f\u5c0f\u7684 overhead \uff0c\u6240\u4ee5\u53ef\u80fd\u5e76\u4e0d\u503c\u5f97 async\/await \u9020\u6210\u7684\u8fc7\u5ea6\u7684\u590d\u6742\u5ea6\u3002\u6211\u5012\u662f\u4e0d\u4e86\u89e3\u786e\u5b9e\u6709\u8fd9\u79cd\u9700\u6c42\uff0c\u6240\u4ee5\u8bf7\u6559\u4e00\u4e0b\u4f60\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\u5982\u679c\u5e76\u884c\u4e86\u4f1a\u600e\u6837\uff1f\u6216\u8005\u8bf4\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u7b80\u5355\u7684\u7528 task \u5904\u7406\u6240\u6709\u7684\u4efb\u52a1\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077772\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ly841000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @leeg810312 go \u592a\u591a\u72c2\u6559\u5f92\uff0c\u548c\u666e\u901a\u4eba\u4e0d\u5728\u4e00\u4e2a\u9891\u9053\uff0c\u5c31\u559c\u6b22\u626f\u4e00\u4e9b\u4e13\u6709\u540d\u8bcd\u5de6\u987e\u53f3\u76fc\uff0c\u4e0d\u56de\u7b54\u5177\u4f53\u95ee\u9898\uff0c\u57fa\u672c\u6ca1\u6709\u4ea4\u6d41\u4ef7\u503c <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077773\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @leeg810312 \u540c\u6b65\u5f02\u6b65\u90fd\u6709\u4e0d\u5916\u4e4e\uff1a<br \/>1. \u8be5\u5e73\u53f0\u65e9\u671f\u5c31\u6ca1\u6709\u5f02\u6b65\uff0c\u5f02\u6b65\u662f\u540e\u6765\u52a0\u7684\u3002<br \/>2. \u5f02\u6b65\u6709\u8f83\u5927\u7684\u590d\u6742\u5ea6\uff0c\u4e0d\u503c\u5f97\u603b\u662f\u4f7f\u7528\u3002<br \/>3. \u5e95\u5c42\u65e0\u8fd0\u884c\u65f6\u7684\u8bed\u8a00\uff0c\u5f53\u7136\u9700\u8981\u90fd\u652f\u6301\u3002<br \/>async\/await \u65e0\u8bba\u54ea\u4e2a\u5b9e\u73b0\u5f62\u5f0f\u90fd\u662f\u4e00\u6837\u7684\uff1a\u51fd\u6570\u8f6c\u6362\u6210\u4e00\u4e2a\u72b6\u6001\u673a\uff0c\u5185\u90e8\u7684 await \u4f5c\u4e3a\u663e\u5f0f\u7684 suspend point \uff0c\u5f53\u6267\u884c\u5230\u7684\u65f6\u5019\u5c06\u51fd\u6570\u6302\u8d77\uff0c\u72b6\u6001\u4fdd\u5b58\uff0c\u7136\u540e\u63a7\u5236\u6d41\u8fd4\u56de\u7ed9 runtime \u3002runtime \u5728\u67d0\u4e2a\u65f6\u95f4\u70b9\u518d\u6b21 schedule \u8be5 task \uff0c\u76f4\u5230\u7ed3\u675f\u3002<br \/>\u5f02\u6b65 context \u4e2d\u8c03\u7528\u963b\u585e\u64cd\u4f5c\u4f1a\u4f7f runtime \u65e0\u6cd5\u62ff\u56de\u63a7\u5236\u6d41\uff0c\u6574\u4e2a\u7ebf\u7a0b\u5c31\u88ab\u963b\u585e\u4e86\uff0c\u800c\u4e0d\u5355\u5355\u662f\u4e00\u4e2a task \u3002\u800c\u8fd9\u4e2a\u7ebf\u7a0b\u662f runtime \u7684 worker \u7ebf\u7a0b\u3002\u5982\u679c runtime \u6709 10 \u4e2a worker \u7ebf\u7a0b\u5e76\u53d1\u5904\u7406\u4e00\u4e07\u4e2a task \uff0c\u90a3\u4e48\u963b\u585e\u4e00\u4e2a\u5c31\u53ea\u5269 9 \u4e2a\u7ebf\u7a0b\u53ef\u4ee5\u6267\u884c\u5176\u4ed6 task \u4e86\uff0c\u5e76\u4e14\u7531\u4e8e task \u90fd\u662f\u5199\u5e76\u53d1\u7684\uff0c\u4ee3\u7801\u91cc\u6709\u963b\u585e\u90e8\u5206\u5927\u6982\u7387\u4e0d\u6b62\u4f1a\u963b\u585e\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u8fd9\u6837\u5c31\u4f1a\u5bfc\u81f4\u6574\u4e2a\u7cfb\u7edf\u7684\u541e\u5410\u91cf\u5927\u5e45\u4e0b\u964d\uff0c\u4e5f\u5c31\u662f\u963b\u585e\u6574\u4e2a runtime \u3002<br \/> kotlin \u5219\u662f\u5b8c\u5168\u4e0d\u540c\u7684\u6a21\u5f0f\uff0c\u867d\u7136\u548c async\/await \u6709\u4e00\u5b9a\u7684\u76f8\u4f3c\u6027\uff0c\u4f46\u8fd9\u548c\u8c03\u5ea6\u5668\u6709\u5565\u5173\u7cfb\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077774\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ly841000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Itoktsnhc \u4f60\u53ef\u4ee5\u8003\u8651\u4e0b\u7cfb\u7edf\u9632\u706b\u5899\u4e4b\u7c7b\u539f\u56e0\uff0cGetWeatherForecast \u8fd9\u6bb5\u4ee3\u7801\u521a\u6211\u6d4b\u8bd5\u4e86\u4e0b\u8fd4\u56de\u662f\u5f88\u5feb\u7684\uff0c\u6ca1\u6709\u95ee\u9898 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077775\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u8c03\u5ea6\u548c GC \u5b8c\u5168\u662f\u4e24\u56de\u4e8b\uff0c\u5916\u52a0\u8fd9\u548c\u6027\u80fd\u538b\u6839\u6ca1\u5173\u7cfb\u3002\u4f60\u662f\u5b8c\u5168\u6ca1\u4e86\u89e3\u8fc7 actor \u76f8\u5173\u7684\u4e1c\u897f\u4e48\uff0c\u8981\u662f\u8fd9\u6837\u7684\u8bdd\u4f60\u53bb\u770b\u770b dotnet \u7ec4\u7684 Orleans \u9879\u76ee\uff0c\u770b\u770b\u4ed6\u4eec\u7684\u7f16\u7a0b\u6a21\u578b\u5982\u679c\u4e0d\u80fd\u81ea\u5b9a\u4e49\u8c03\u5ea6\u5668\u7684\u8bdd\uff0c\u8981\u600e\u4e48\u4f18\u96c5\u7684\u5b9e\u73b0\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077776\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leoskey <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges await \u4e0d\u4f1a\u963b\u585e\u7ebf\u7a0b\u54c8\uff0c\u7ebf\u7a0b\u5728\u7b49\u5f85 task \u5b8c\u6210\u65f6\u5019\uff0c\u4f1a\u53bb\u6267\u884c\u5176\u5b83 task <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077777\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 \u5f53\u7136\uff0c\u6211\u53ea\u662f\u8bf4\u65e2\u7136\u63a5\u53d7\u4e86 GC \u66f4\u5bb9\u6613\u63a5\u53d7\u5176\u4ed6\u5177\u6709\u4e00\u5b9a overhead \u4f46\u964d\u4f4e\u590d\u6742\u5ea6\u7684\u65b9\u5f0f\u3002<br \/>orleans \u662f\u5206\u5e03\u5f0f\u7684\u4e1c\u897f\u4e48\uff0c\u90a3\u5c31\u7406\u89e3\u4e86\uff0c\u5206\u5e03\u5f0f\u6709\u4ec0\u4e48\u9700\u6c42\u6211\u90fd\u4e0d\u5947\u602a\u3002erlang\/elixir \u5c31\u662f green thread \u548c actor model \uff0c\u9700\u4e0d\u9700\u8981\u81ea\u5b9a\u4e49\u8c03\u5ea6\u5668\u6211\u4e0d\u6e05\u695a\uff0c\u4e0d\u8fc7\u663e\u7136\u4e0e async\/await \u6ca1\u5565\u5173\u7cfb\u3002<br \/> @leoskey await \u4f1a\u628a\u51fd\u6570\u6302\u8d77\u63a7\u5236\u6d41\u8fd8\u7ed9 runtime \uff0c\u5f53\u7136\u4e0d\u4f1a\u963b\u585e\u3002\u6211\u8bf4\u7684\u662f\u8c03\u7528\u540c\u6b65\u64cd\u4f5c\uff0c\u5982 Thread.sleep \u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077778\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges async\/await \u53ea\u662f\u4e00\u4e2a\u53eb\u6cd5\uff0c\u51c6\u786e\u7684\u8bf4\u662f\u9700\u8981\u80fd\u591f\u81ea\u5b9a\u4e49\u6267\u884c\u6d41\u7684\u6682\u505c\u548c\u6062\u590d\u3002\u4f46\u662f\u76ee\u524d\u4e3b\u6d41\u8bed\u8a00\u91cc\u80fd\u505a\u5230\u8fd9\u70b9\u7684\u57fa\u672c\u90fd\u53eb async\/await \u6240\u4ee5\u8bf4\u5f3a\u4f9d\u8d56\u4e5f\u5f53\u7136\u6ca1\u9519\u3002\u53e6\u5916\u8fd9\u4e2a\u9700\u6c42\u548c\u5206\u5e03\u5f0f\u5176\u5b9e\u5173\u7cfb\u4e0d\u5927\uff0c\u5355\u7eaf\u7684\u53ea\u662f\u548c\u7f16\u7a0b\u6a21\u578b\u6709\u5173\u7cfb\u3002\u8fd8\u6709\u6211\u60f3\u8bf4\u7684\u662f\uff0cGC \u4e0d\u4ee3\u8868\u5c31\u4e00\u5b9a\u8981\u6709\u5f00\u9500\u4f46\u662f\u964d\u4f4e\u590d\u6742\u5ea6\u3002\u4f60\u770b\u770b\u6700\u8fd1\u5fae\u8f6f\u5bf9 dotnet \u505a\u7684\u5f88\u591a\u66f4\u65b0\uff0c\u663e\u7136\u662f\u76f8\u53cd\u7684\u64cd\u4f5c\uff0c\u5305\u62ec Span&lt;T&gt; \u3001Memory&lt;T&gt; \u7b49\u7b49\u8fd9\u7c7b\u4e1c\u897f\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077779\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Lemeng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u54ce\u5440\u3002\u5934\u75bc <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077780\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 async\/await \u662f\u663e\u5f0f\u6807\u660e suspend point \u7684\u4e00\u79cd\u65b9\u5f0f\uff0c\u76f8\u5bf9\u5e94\u7684\u662f\u9690\u5f0f\u63d2\u5165 suspend point \u3002\u4f60\u8981\u5177\u4f53\u63a7\u5236\u8c03\u5ea6\u53ea\u8981 spawn \u7684\u65f6\u5019\u80fd\u63d0\u4f9b\u53c2\u6570\u5c31\u597d\u4e86\uff0c\u4e0d\u4f9d\u8d56\u663e\u5f0f\u6216\u8005\u9690\u5f0f\u3002<br \/>\u6211\u89c9\u5f97\u8bed\u8a00\u8bbe\u8ba1\u8fd8\u662f\u8981\u5c3d\u91cf\u4e13\u6ce8\uff0c\u4e0d\u5e94\u8be5\u8ffd\u6c42\u6ee1\u8db3\u6240\u6709\u9700\u6c42\u3002\u5f00\u4e00\u4e9b unsafe \u7684\u540e\u95e8\u5012\u4e5f\u6ca1\u5565\uff0c\u6709\u9700\u8981\u53ef\u4ee5\u7528\uff0c\u4e0d\u7528\u65f6\u4e5f\u4e0d\u4f1a\u6709\u5f71\u54cd\u3002\u4f46\u6574\u4f53\u8bbe\u8ba1\u4e0a\u6709\u5f00\u9500\u65f6\u540c\u65f6\u5bfc\u81f4\u4e0d\u5fc5\u8981\u7684\u590d\u6742\u6027\uff0c\u5c31\u4e0d\u7b97\u826f\u597d\u7684\u8bbe\u8ba1\u4e86\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077781\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u5982\u679c\u9690\u5f0f\u63d2\u6869\u4f60\u8fd8\u8981\u63a7\u5236\u8c03\u5ea6\uff0c\u81ea\u5b9a\u4e49\u8c03\u5ea6\u5b9e\u73b0\u8d77\u6765\u4f1a\u6bd4\u663e\u793a\u8c03\u5ea6\u66f4\u52a0\u9ebb\u70e6\uff0c\u800c\u4e14\u9690\u5f0f\u8c03\u5ea6\u8fd8\u4f1a\u6709\u96be\u4ee5\u533a\u5206\u540c\u6b65\u548c\u5f02\u6b65\u8c03\u7528\u7684\u95ee\u9898\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077782\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 \u63d2\u6869\uff08\u6784\u9020 task \uff09\u53ea\u662f\u63d2\u6869\uff0c\u548c\u8c03\u5ea6\uff08\u6267\u884c task \uff09\u6ca1\u6709\u5173\u7cfb\u7684\u554a\u3002<br \/>\u5173\u4e8e\u533a\u5206\uff0c\u4f60\u53ef\u4ee5\u9690\u5f0f suspend(await)\uff0c\u4f46\u663e\u5f0f async \uff0ckotlin \u5c31\u662f\u8fd9\u6837\u5b50\u3002go \u5219\u662f\u53ea\u80fd\u5199\u201c\u540c\u6b65\u201d\u7684\u4ee3\u7801\u3002  <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077783\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges \u6784\u9020 task \u548c\u8c03\u5ea6 task \u5f53\u7136\u6ca1\u5173\u7cfb\uff0c\u4f46\u662f\u9690\u5f0f\u4e5f\u5c31\u610f\u5473\u7740\u4f60\u4e0d\u4f1a\u663e\u793a\u628a Task \u5f53\u8fd4\u56de\u503c\u5199\u4e0a\uff0c\u8fd9\u6837\u8c03\u7528\u65b9\u662f\u4e0d\u80fd\u533a\u5206\u8fd9\u4e2a\u65b9\u6cd5\u5230\u5e95\u662f\u60f3\u8ba9\u4f60\u5f02\u6b65\u8c03\u7528\u8fd8\u662f\u540c\u6b65\u8c03\u7528\u3002kt \u90a3\u4e2a\u5f02\u6b65\u4e0d\u7ba1\u662f\u7528\u8fd8\u662f\u81ea\u5b9a\u4e49\u8c03\u5ea6\uff0c\u90fd\u6bd4 C#\u9ebb\u70e6\u7684\u591a\uff0c\u662f\u4e2a\u5f88\u597d\u7684\u4f8b\u5b50\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077784\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Buges <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 \u540c\u6b65\u8fd8\u662f\u5f02\u6b65\u662f\u7531\u8c03\u7528\u65b9\u51b3\u5b9a\u7684\uff0c\u65b9\u6cd5\u672c\u8eab\u53ea\u8981\u5b9e\u73b0\u597d\u81ea\u5df1\u7684\u903b\u8f91\uff0c\u4e0d\u7528\u5173\u5fc3\u81ea\u5df1\u88ab\u5982\u4f55\u8c03\u7528\u554a\u3002<br \/>kotlin \u7684\u65b9\u5f0f\u66f4\u76f4\u767d\uff0csuspend \u8868\u660e\u8be5\u51fd\u6570\u5185\u90e8\u5b58\u5728 suspend point \uff0c\u8981\u540c\u6b65\u8c03\u7528\u90a3\u5c31\u76f4\u63a5\u8c03\u7528\uff0c\u8981\u5f02\u6b65\u8c03\u7528\u90a3\u5c31 async \u5305\u4e00\u5c42\u518d\u8c03\u7528\u3002\u4ece\u53e6\u4e00\u4e2a\u89d2\u5ea6\u6765\u8bf4\uff0c\u53ef\u4ee5\u770b\u4f5c\u662f async \u6bcf\u6b21\u88ab\u8c03\u7528\u65f6\u81ea\u52a8\u6dfb\u52a0\u4e86 await \uff0c\u5e73\u65f6 async \u7d27\u8ddf await \u7684\u662f\u6700\u5e38\u89c1\u7684\uff0c\u8fd9\u6837\u53cd\u800c\u51cf\u5c11\u4e86\u5f88\u591a\u8f93\u5165\u3002scope \u7684\u5b58\u5728\u4e5f\u8ba9\u7ec6\u7c92\u5ea6\u7684\u63a7\u5236\uff08\u5305\u62ec\u8c03\u5ea6\u3001\u53d6\u6d88\u7b49\uff09\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002zig \u4e5f\u91c7\u7528\u4e86\u7c7b\u4f3c\u7684\u65b9\u5f0f\uff0c\u540c\u65f6\u521b\u9020\u6027\u5730\u89e3\u51b3\u4e86 colored function \u95ee\u9898\uff08 async \u5728\u540c\u6b65\u73af\u5883\u4e2d\u81ea\u52a8\u53d8\u6210 noop \uff09\u3002<br \/>\u50cf go \u90a3\u6837\u5e72\u8106\u628a\u5f02\u6b65\u8c03\u7528\u780d\u6389\uff0c\u53ea\u80fd\u5199\u201c\u540c\u6b65\u201d\u4ee3\u7801\uff0c\u4e5f\u4e0d\u5931\u4e3a\u4e00\u79cd\u4e0d\u9519\u7684\u65b9\u5f0f\uff0c\u5728\u5176\u76ee\u6807\u9886\u57df\u8868\u73b0\u826f\u597d\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077785\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges kt \u90a3\u79cd\u6a21\u5f0f\u548c await \u6ca1\u6709\u4ec0\u4e48\u533a\u522b\uff0c\u6211\u53cd\u800c\u89c9\u5f97\u53d8\u5f97\u9ebb\u70e6\u800c\u4e14\u4e0d\u76f4\u89c2\u3002\u6211\u8ba4\u4e3a\u826f\u597d\u7684\u65b9\u5f0f\u9700\u8981\u6ee1\u8db3\u4e24\u4e2a\u6761\u4ef6\uff0c\u4e00\u4e2a\u662f\u663e\u793a\u544a\u8bc9\u8c03\u7528\u8005\u8fd9\u4e2a\u65b9\u6cd5\u5185\u662f\u5426\u6709\u5f02\u6b65\u8c03\u7528\uff0c\u7b2c\u4e8c\u4e2a\u662f\u663e\u793a\u8fdb\u884c\u5f02\u6b65\u7b49\u5f85\u3002\u6240\u4ee5\u6211\u5e76\u4e0d\u592a\u559c\u6b22 kt \u90a3\u4e2a\u6a21\u5f0f\u3002\u4ee5\u53ca\u6211\u4e4b\u524d\u5c1d\u8bd5\u7ed9 kt \u5b9a\u5236\u8c03\u5ea6\u5668\uff0c\u89c9\u5f97\u6bd4 C#\u9ebb\u70e6\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077786\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : forgottencoast <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @liuhan907 <br \/>@Buges <br \/>\u957f\u7bc7\u5927\u8bba\u6587\u5b57\u8ba8\u8bba\u4e0d\u5982\u5199\u4ee3\u7801\u6765\u660e\u793a\u5404\u79cd\u65b9\u5f0f\u7684\u4f18\u52a3\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077787\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhan907 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @forgottencoast \u61d2\uff0c\u8fd9\u73a9\u610f\u4e00\u5199\u5c31\u662f\u51e0\u767e\u884c\u8fd8\u5f97\u52a0\u6ce8\u91ca\u548c\u4e24\u4efd\u4ee3\u7801\u5bf9\u6bd4\uff0c\u4e0d\u60f3\u5199\uff0c\u53c8\u4e0d\u662f\u505a\u6559\u7a0b\u3002 <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077788\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0o0o0o0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> @Buges <br \/>C# \u4e2d Thread.Sleep() \u4f1a\u963b\u585e\u5f53\u524d\u8fdb\u7a0b\uff0cKotlin \u4e2d Thread.sleep() \u4e5f\u4f1a\u963b\u585e\u7ebf\u7a0b\u3002<br \/>Kotlin \u4e2d delay() \u76f8\u5f53\u4e8e C# \u4e2d\u7684 Task.delay()\uff0c\u90fd\u53ef\u4ee5\u6302\u8d77 \u534f\u7a0b \/Task \uff0c\u91ca\u653e\u5f53\u524d\u7684\u7ebf\u7a0b\u3002<br \/>Kotlin \u7684 \u534f\u7a0b \u548c C# Task \u5b9e\u73b0\u65b9\u5f0f\u6709\u533a\u522b\uff0c\u4f46\u662f\u7528\u8d77\u6765\u4f3c\u4e4e\u6ca1\u6709\u4ec0\u4e48\u533a\u522b\uff0c\u6240\u4ee5\u8bf4 Kotlin \u7684\u534f\u7a0b\u6709\u4ec0\u4e48\u4f18\u70b9\u5462\uff1f <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"7077789\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0o0o0o0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>  <\/span> <\/div>\n<\/p><\/div>\n<div> \u5bf9\u5f02\u6b65\u611f\u5174\u8da3\u7684\u53ef\u4ee5\u770b\u4e00\u4e0b\u8fd9\u4e2a issue<br \/>https:\/\/github.com\/dotnet\/runtime\/issues\/45159<br \/>\uff08\u5c3e\u90e8\u4f1a\u94fe\u63a5\u5230\u53e6\u4e00\u4e2a issue \uff09<br \/>\u611f\u89c9\u91cc\u9762\u5c31\u662f\u4e0a\u9762\u4e24\u4f4d\u5927\u4f6c\u5435\u7684\u5185\u5bb9 <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6c42\u52a9\uff1a.NET Core WebA&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/553849"}],"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=553849"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/553849\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=553849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=553849"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=553849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}