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

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

  •  
  •   kingslanding · Jan 12, 2019 · 3459 views
    This topic created in 2866 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
    takeoffyoung
    Jan 12, 2019❤️1
    1
    你这是创建了一个 数组,数组的每个元素都是 一个 chan。至于数组中每个 chan 的 buffer 是多大,你需要单独去处理。
    kingslanding
    kingslanding
    OP
    Jan 12, 2019
    2
    谢谢楼上,明白了~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4610 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 01:33 · PVG 09:33 · LAX 17:33 · JFK 20:33
    ♥ Do have faith in what you're doing.