iswbm / GolangCodingTime

Go编程时光,一个零基础入门 Golang 的教程

Home Page:http://golang.iswbm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

c04/c04_06

utterances-bot opened this issue · comments

4.6 学习 Go 协程:互斥锁和读写锁 — Go编程时光 1.0.0 documentation

https://golang.iswbm.com/c04/c04_06.html

commented

$ go run main.go
count 的值为: 3000

$ go run main.go
count 的值为: 3000

$ go run main.go
count 的值为: 3000

$ go run main.go
count 的值为: 3000

$ go run main.go
count 的值为: 3000
哈哈,笑死了,就一直是3000

commented

哈哈,同上,一直执行,也都是3000

哈哈,同上,一直执行,也都是3000

不放把这个n调大,就会出现了