README: goroutine
This commit is contained in:
12
_demo/goroutine/goroutine.go
Normal file
12
_demo/goroutine/goroutine.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
done := false
|
||||
go func() {
|
||||
println("Hello, goroutine")
|
||||
done = true
|
||||
}()
|
||||
for !done {
|
||||
print(".")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user