4 ms·
Anyone has any idea why the code from slide 5 doesn't print anything? http://play.golang.org/p/NtjHL3F1LC http://play.golang.org/p/NtjHL3F1LC
by brunoqc 14y ago
Anyone has any idea why the code from slide 5 doesn't print anything? http://play.golang.org/p/NtjHL3F1LC http://play.golang.org/p/NtjHL3F1LC
- jgrahamc 14y agoBecause I shortened it for the slide. Add something at the end of main() that waits a bit (say time.Sleep(time.Minute)). What's happening is main() terminates before those goroutines get to run. http://play.golang.org/p/rJ9eE7p7gz http://play.golang.org/p/rJ9eE7p7gz