Untitled

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "fmt" "time" ) var global obj func init() { global = obj{} } type obj struct {} func (o obj) Do() { time.Sleep(5 * time.Second) } func main() { fmt.Println(time.Now()) done := make(chan struct{}, 10) for i:=0; i<10; i++ { go func() { global.Do() fmt.Println(time.Now()) done<-struct{}{} }() } for i:=0; i<10; i++ { <-done } }
Editor Settings
Theme
Key bindings
Full width
Lines