This commit is contained in:
zyw271828 2020-09-26 16:31:00 +08:00
parent 76393da54c
commit 8bb135d093
No known key found for this signature in database
GPG Key ID: FE93AC8ED5315B45

View File

@ -13,7 +13,7 @@ go f() // create a new goroutine that calls f(); don't wait
下面的例子main goroutine将计算菲波那契数列的第45个元素值。由于计算函数使用低效的递归所以会运行相当长时间在此期间我们想让用户看到一个可见的标识来表明程序依然在正常运行所以来做一个动画的小图标
<u><i>gopl.io/ch8/spinner</i><u>
<u><i>gopl.io/ch8/spinner</i></u>
```go
func main() {
go spinner(100 * time.Millisecond)