Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waitGroup.Wait() #26

Closed
iamxvbaba opened this issue Mar 12, 2018 · 1 comment
Closed

waitGroup.Wait() #26

iamxvbaba opened this issue Mar 12, 2018 · 1 comment

Comments

@iamxvbaba
Copy link

waitGroup.Wait()

Shouldn't it be in the main thread?
The main thread exits, all the goroutine exit, right?

@michal-kazmierczak
Copy link

The code is correct. The main thread calls Display()(search/search.go:56) which is running a loop on a channel (search/match.go:40) until the channel is closed search/search.go:51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants