{"id":324717,"date":"2021-02-06T10:26:44","date_gmt":"2021-02-06T02:26:44","guid":{"rendered":"http:\/\/4563.org\/?p=324717"},"modified":"2021-02-06T10:26:44","modified_gmt":"2021-02-06T02:26:44","slug":"golang-%e5%a4%9a%e4%b8%aa%e5%8d%8f%e7%a8%8b%e4%b8%ad-%e8%af%bb%e5%8f%96%e5%90%8c%e4%b8%80%e4%b8%aa-channel%ef%bc%8c%e6%80%8e%e4%b9%88%e4%b8%8d%e6%98%af%e6%8c%89%e9%a1%ba%e5%ba%8f%e6%89%93%e5%8d%b0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=324717","title":{"rendered":"golang \u591a\u4e2a\u534f\u7a0b\u4e2d \u8bfb\u53d6\u540c\u4e00\u4e2a channel\uff0c\u600e\u4e48\u4e0d\u662f\u6309\u987a\u5e8f\u6253\u5370"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  golang \u591a\u4e2a\u534f\u7a0b\u4e2d \u8bfb\u53d6\u540c\u4e00\u4e2a channel\uff0c\u600e\u4e48\u4e0d\u662f\u6309\u987a\u5e8f\u6253\u5370               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hyp1002950 <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>func main(){<\/p>\n<pre><code>ch := make(chan int)  go func(){  for{   c :=&lt;-ch   fmt.Println(\"one:\",c,\"len:\",len(ch))  } }()  go func(){  for{   c :=&lt;-ch   fmt.Println(\"two:\",c,\"len:\",len(ch))  } }()  for i:=1;i&lt;=100;i++{  ch&lt;-i }  time.Sleep(time.Second * time.Duration(2)) <\/code><\/pre>\n<p>}<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>31<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5060193\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cloverzrg2 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u628a\u5de5\u4f5c\u5206\u7ed9\u4e24\u4e2a\u5de5\u4eba\u53bb\u505a\uff0c\u5de5\u4eba 1 \u548c\u5de5\u4eba 2 \u7684\u5b8c\u6210\u7684\u5148\u540e\u987a\u5e8f\u662f\u4e0d\u786e\u5b9a\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060194\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jazzychai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u56e0\u4e3a\u5b83\u4eec\u662f X \u4e2a goroutine \u5728\u6267\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060195\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : huobazi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6309\u987a\u5e8f\u7528\u534f\u7a0b\u5e72\u5565\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060196\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : beidounanxizi <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bfb\u53d6 channel \u7684\u6570\u636e\u987a\u5e8f\u662f\u987a\u5e8f\u8bfb\u53d6\u7684<br \/> \u4f46\u662f\u4f60\u7684 goroutine \u8fd0\u884c\u987a\u5e8f <br \/>\u7531\u8c03\u5ea6\u5668\u8c03\u5ea6\u7684 \u4e0d\u53d7\u4f60\u7684\u63a7\u5236 <br \/>\u9664\u975e\u4f60\u80fd\u505a\u5230\u540c\u6b65                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060197\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hyp1002950 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &lt;-ch \u4e0d\u662f\u4f1a\u963b\u585e\u4e48\uff0c\u6211\u60f3\u7740\u5b83\u5e94\u8be5\u662f\u5728\u534f\u7a0b\u4e2d\u63a5\u6536\u5230 1 \u6253\u5370\u51fa\u6765\u4e86 \u7136\u540e\u624d\u80fd\u63a5\u6536\u5230 2 \u518d\u6253\u5370\uff0c\u73b0\u5728\u7ed9\u6211\u611f\u89c9\u662f \u63a5\u6536\u548c\u6253\u5370\u4e0d\u662f\u4e00\u4e2a\u539f\u5b50\u64cd\u4f5c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060198\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yzbythesea <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5148\u63a5\u53d7\u4e0d\u4e00\u5b9a\u5148\u6253\u5370\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060199\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yzbythesea <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5fc5\u7136\u4e0d\u662f\u539f\u5b50\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060200\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cxh116 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65e0\u8111\u731c stdout print \u5e94\u8be5\u7b97\u662f IO \u64cd\u4f5c, IO \u64cd\u4f5c\u65f6 goroutine \u5207\u6362\u4e86.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060201\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zxlzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ch&lt;-i \u540e\u9762 sleep \u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060202\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hyp1002950 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cxh116 \u6211\u89c9\u5f97\u8fd9\u4e2a\u8bf4\u6cd5\u80fd\u60f3\u901a\uff0c\u63a5\u6536\u548c\u6253\u5370\u5e94\u8be5\u662f\u4e00\u8d77\u8fd0\u884c\u4e86\uff0c\u53ea\u662f print \u662f IO \u64cd\u4f5c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060203\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hyp1002950 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxlzy \u6211\u5728 fmt.Println \u4e4b\u540e sleep \u4e86\uff0c\u6253\u5370\u5c31 1-100 \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060204\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sadfQED2 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u7ed9\u4f60\u7684\u7ba1\u9053\u7f13\u51b2\u957f\u5ea6\u8bbe\u7f6e\u6210 1 \u5c31\u662f\u987a\u5e8f\u7684\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060205\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sadfQED2 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u6ca1\u8bbe\u7f6e\u957f\u5ea6\uff0c\u6240\u4ee5 ch&lt;-i \u4e0d\u4f1a\u963b\u585e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060206\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : towry <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u80fd\u770b\u4e0d\u6ce8\u91cd\u4ee3\u7801\u683c\u5f0f\u7684\u4eba\u5199\u7684\u4ee3\u7801                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060207\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @sadfQED2 https:\/\/play.golang.org\/p\/zoNa2QRR6F- \u7136\u800c\u4e0d\u662f\u2026\u2026<br \/>\u6ca1\u8bbe\u7f6e\u957f\u5ea6\u7684\u8bdd\u6211\u8bb0\u5f97\u662f\u6ca1\u63a5\u6536\u65b9\u5c31\u963b\u585e\uff0c\u6709\u63a5\u6536\u65b9\u8f6c\u79fb\u5230\u63a5\u6536\u65b9<br \/>\u800c\u4e14\u5c31\u7b97\u8bbe\u7f6e\u957f\u5ea6\u8f93\u51fa\u4ecd\u7136\u662f\u6df7\u4e71\u7684<\/p>\n<p>\u4f3c\u4e4e\u6bcf\u4e2a goroutine \u6709\u5355\u72ec\u7684\u8f93\u51fa\u7f13\u51b2\u533a\uff0c\u518d\u7528\u4e00\u4e2a channel \u53bb\u96c6\u4e2d\u7684\u8bdd\u5c31\u53ef\u4ee5<br \/>https:\/\/play.golang.org\/p\/Xa-lwecfveV<br \/>\u4f46\u4e0d\u662f\u5f88\u61c2\u6ca1\u8bbe\u7f6e\u957f\u5ea6\u4f46\u6709\u96c6\u4e2d\u7684\u60c5\u51b5\u4e0b\u4e3a\u4ec0\u4e48\u8fd8\u662f\u4e71\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060208\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @no1xsyzy \u53ef\u80fd\u4e0d\u662f\u5355\u72ec\u7f13\u51b2\u533a\u4e00\u8bf4\uff0c\u7528\u4ee4\u724c\u65b9\u6cd5\u4fdd\u8bc1\u4e24\u4e2a goroutine \u4ea4\u66ff\u8fd0\u884c\u4ee5\u540e\u7acb\u5373\u4fdd\u8bc1\u4e86\u8f93\u51fa\u4e5f\u662f one two \u4ea4\u66ff\u7684\u2026\u2026<br \/>\u800c\u4e14 Println \u5e94\u5f53\u4f1a flush \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060209\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : oluoluo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u91cc\u7684 channel \u662f\u65e0\u7f13\u51b2\u901a\u9053\uff0c\u4f1a\u963b\u585e\u7684\uff0c\u6240\u4ee5\u503c\u662f\u6309\u7167\u987a\u5e8f\u4ece channel \u4e2d\u53d6\u51fa\u6765\u7684\uff0c\u4f46\u662f\u53d6\u503c\u548c\u6253\u5370\u4e0d\u662f\u539f\u5b50\u7684\uff0c\u4e2d\u95f4\u8c03\u5ea6\u5668\u53d1\u751f\u8c03\u5ea6\u5bfc\u81f4\u6253\u5370\u7684\u7ed3\u679c\u4e0d\u662f\u987a\u5e8f\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060210\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : janxin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u56e0\u4e3a\u4f60 goroutine \u8c03\u5ea6\u4e0d\u662f\u987a\u5e8f\u6267\u884c\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060211\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qq1340691923 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             package main<\/p>\n<p>import (<br \/> &#8220;fmt&#8221;<br \/> &#8220;sync&#8221;<br \/> &#8220;time&#8221;<br \/>)<\/p>\n<p>func main() {<br \/> loca := sync.Mutex{}<br \/> ch := make(chan int)<\/p>\n<p> go func() {<br \/> for {<br \/> loca.Lock()<br \/> {<br \/> c := &lt;-ch<br \/> fmt.Println(&#8220;one:&#8221;, c, &#8220;len:&#8221;, len(ch))<br \/> }<br \/> loca.Unlock()<\/p>\n<p> }<br \/> }()<\/p>\n<p> go func() {<br \/> for {<br \/> loca.Lock()<br \/> {<br \/> c := &lt;-ch<br \/> fmt.Println(&#8220;two:&#8221;, c, &#8220;len:&#8221;, len(ch))<br \/> }<br \/> loca.Unlock()<br \/> }<br \/> }()<\/p>\n<p> for i := 1; i &lt;= 100; i++ {<br \/> ch &lt;- i<br \/> }<\/p>\n<p> time.Sleep(time.Second * time.Duration(2))<br \/>}<\/p>\n<p>\u8fd9\u6837\u5c31\u597d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060212\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : php01 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63a5\u6536\u5230\u7684\u987a\u5e8f\u5fc5\u7136\u662f\u6309\u987a\u5e8f\u6765\u7684\uff0c\u4f46\u662f\u54ea\u4e2a\u534f\u7a0b\u5148\u8bfb\u5230\uff0c\u6216\u5148\u5199\u51fa\uff0c\u662f\u63a7\u5236\u4e0d\u4e86\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060213\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Nitroethane <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @hyp1002950 #11 \u7528 sleep \u5e76\u4e0d\u662f\u5b8c\u7f8e\u7684\u540c\u6b65\u65b9\u6cd5\uff0c\u867d\u7136\u5c06 sleep \u7684\u65f6\u95f4\u8bbe\u7f6e\u7684\u957f\u4e00\u70b9\u53ef\u4ee5\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u5f97\u5230\u987a\u5e8f\u8f93\u51fa\uff0c\u4f46\u672c\u8d28\u4e0a\u7531\u4e8e goroutine \u8c03\u5ea6\u5668\u7684\u539f\u56e0\u8fd8\u662f\u4f1a\u53ef\u80fd\u51fa\u73b0\u4e71\u5e8f\u8f93\u51fa\u60c5\u51b5\uff0c\u56e0\u4e3a\u54ea\u4e2a goroutine \u5148\u6267\u884c\u53d6\u51b3\u4e8e\u8c03\u5ea6\u5668\u3002\u6b63\u786e\u7684\u505a\u6cd5\u662f\u7528\u4e00\u4e2a\u65e0 buffer \u7684 channel \u53bb\u505a\u4e24\u4e2a goroutine \u4e4b\u95f4\u7684\u540c\u6b65                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060214\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : keepeye <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528\u5355\u6838 cpu \u53ef\u80fd\u5f97\u5230\u987a\u5e8f\u7ed3\u679c\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060215\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kele1997 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &#8220;`<br \/>var lock1 sync.Mutex<br \/>var lock2 sync.Mutex<\/p>\n<p>func main() {<br \/> ch := make(chan int)<\/p>\n<p> lock2.Lock()<br \/> go func() {<br \/> for {<br \/> lock1.Lock()<br \/> c := &lt;-ch<br \/> fmt.Println(&#8220;one:&#8221;, c, &#8220;len:&#8221;, len(ch))<br \/> lock2.Unlock()<br \/> }<br \/> }()<\/p>\n<p> go func() {<br \/> for {<br \/> lock2.Lock()<br \/> c := &lt;-ch<br \/> fmt.Println(&#8220;two:&#8221;, c, &#8220;len:&#8221;, len(ch))<br \/> lock1.Unlock()<br \/> }<br \/> }()<\/p>\n<p> for i := 1; i &lt;= 100; i++ {<br \/> ch &lt;- i<br \/> }<\/p>\n<p> time.Sleep(time.Second * time.Duration(2))<br \/>}<\/p>\n<p>&#8220;`                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060216\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : KaynW <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @keepeye \u5e76\u4e0d\u4f1a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060217\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : back0893 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u534f\u7a0b\u7684\u8c03\u7528\u4f60\u6ca1\u6709\u529e\u6cd5\u4fdd\u8bc1\u662f\u987a\u5e8f\u8c03\u7528                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060218\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhyl <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e24\u4e2a\u4eba\u5728\u7a97\u53e3\u53d6\u9910\uff0c\u8c01\u5148\u8c01\u540e\u80af\u5b9a\u8981\u4e89\u4e00\u4e89\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060219\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Takamine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             channel \u53ea\u662f\u987a\u5e8f\u653e\u5728\u4e86\u4e00\u4e2a queue \u91cc\uff0c\u591a\u4e2a worker \u6bcf\u6b21\u8c01\u53bb\u53d6\u4e0d\u4e00\u5b9a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060220\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : useben <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5e95\u5c42\u662f\u9501                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060221\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kifile <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3a\u4ec0\u4e48\u7eff\u76ae\u8f66\u6bd4\u9ad8\u94c1\u53d1\u8f66\u65e9\uff0c\u4f46\u662f\u6bd4\u9ad8\u94c1\u5230\u7684\u665a\u5462\uff0c\u8fd9\u5c31\u662f\u539f\u56e0                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060222\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhuzeitou <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u8bd5\u8bd5 go func \u7684\u6700\u540e runtime.Gosched()\u4e00\u4e0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5060223\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : adamwong <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63a5\u6536\u662f\u539f\u5b50\u7684\uff0c\u63a5\u6536+\u6253\u5370\u4e0d\u662f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>golang \u591a\u4e2a\u534f\u7a0b\u4e2d \u8bfb\u53d6\u540c\u4e00&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\/324717"}],"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=324717"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/324717\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=324717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=324717"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=324717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}