init commit
This commit is contained in:
18
archive/go/goroutine.go
Normal file
18
archive/go/goroutine.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var tmp string
|
||||
runtime.GOMAXPROCS(1)
|
||||
for i := 0; i < 10; i++ {
|
||||
go func() {
|
||||
for {
|
||||
}
|
||||
}()
|
||||
}
|
||||
fmt.Scanln(&tmp)
|
||||
}
|
Reference in New Issue
Block a user