Исходники и презентации
This commit is contained in:
16
lessons/goroutines_and_scheduler/goroutine_index/main.go
Normal file
16
lessons/goroutines_and_scheduler/goroutine_index/main.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
for i := 0; i < 5; i++ {
|
||||
go func() {
|
||||
fmt.Print(i)
|
||||
}()
|
||||
}
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
Reference in New Issue
Block a user