The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
kingslanding

求问每个元素都带缓冲的 chan 数组如何 make

  •  
  •   kingslanding · Jan 12, 2019 · 3338 views
    This topic created in 2821 days ago, the information mentioned may be changed or developed.

    求问: 带缓冲的 chan 是这样的:make(chan int,10) chan 数组是这样的:make([]chan int,10) 那每个元素都带缓冲的 chan 数组是怎么样 make 的呢?

    2 replies  •  2019-01-12 12:52:52 +08:00
    takeoffyoung
        1
    takeoffyoung  
       Jan 12, 2019   ❤️ 1
    你这是创建了一个 数组,数组的每个元素都是 一个 chan。至于数组中每个 chan 的 buffer 是多大,你需要单独去处理。
    kingslanding
        2
    kingslanding  
    OP
       Jan 12, 2019
    谢谢楼上,明白了~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2283 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 01:23 · PVG 09:23 · LAX 18:23 · JFK 21:23
    ♥ Do have faith in what you're doing.