proxytoworld
V2EX  ›  问与答

go 中使用协程时定义的 var wt sync.WaitGroup,是否要在整个程序内使用(var Wt sync.WaitGroup),还是一个包定义一个

  •  
  •   proxytoworld · May 2, 2021 · 963 views
    This topic created in 1848 days ago, the information mentioned may be changed or developed.

    我在 sendData 包内定义了一个 WaitGroup,现在在 main 中还要使用 WaitGroup,不知道要不要再定义一个

    1 replies    2021-05-02 22:44:51 +08:00
    Muninn
        1
    Muninn  
       May 2, 2021
    这没有技术上的问题,是个业务逻辑的问题啊。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   881 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 19:48 · PVG 03:48 · LAX 12:48 · JFK 15:48
    ♥ Do have faith in what you're doing.