proxytoworld
V2EX  ›  问与答

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

  •  
  •   proxytoworld · May 2, 2021 · 1044 views
    This topic created in 1888 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   ·   5405 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 07:38 · PVG 15:38 · LAX 00:38 · JFK 03:38
    ♥ Do have faith in what you're doing.