README: goroutine

This commit is contained in:
xushiwei
2024-06-01 16:14:26 +08:00
parent 51f3ac2376
commit 881574ed39
2 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
package main
func main() {
done := false
go func() {
println("Hello, goroutine")
done = true
}()
for !done {
print(".")
}
}