GitBucket
4.23.0
Toggle navigation
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
sample-golang
/
01_hello
Browse code
add goroutine sample
master
1 parent
2f93c97
commit
5cfe5145cd428cbb1a43d2c9d9610ad3e59fbb35
yhornisse
authored
on 3 Oct 2021
Patch
Showing
2 changed files
goroutine/README.md
goroutine/goroutine.go
Ignore Space
Show notes
View
goroutine/README.md
0 → 100644
## MEMO - 最初に呼び出されるgoroutineはmain goroutine
Ignore Space
Show notes
View
goroutine/goroutine.go
0 → 100644
package main import ( "fmt" "time" ) func hoge() { for i := 0; i < 10; i++ { fmt.Println(i) time.Sleep(1 * time.Second) } } func main() { go hoge() time.Sleep(3 * time.Second) }
Show line notes below