![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go/golang
hsq_roy
在读研究生,研究方向区块链.
展开
-
golang 学习随笔
big.Int type Int struct { neg bool // sign 值小于0 为 ture , 否则为 false ,详见 SetInt64 源码 abs nat // absolute value of the integer 所存值的绝对值 } // SetInt64 sets z to x and returns z. func (z *Int) SetI...原创 2020-04-10 15:40:00 · 452 阅读 · 0 评论 -
golang 深入浅出之 goroutine 理解
goroutine 是 Go 并行设计的核心,其本质就是协程,协程比线程小,也叫轻量级线程,它可以轻松创建上万个而不会导致系统资源的枯竭。十几个 goroutine 可能体现在底层就是五六个线程,一个线程可以有任意多个协程,但是某一个时刻只能有一个协程在运行,多个协程共享该线程分配到的计算机资源。创建 goroutine 只需在函数调用前加上 go 语句,就可以创建并发执行单元,开发人员无需了解任何执行细节,调度器会自动安排其到合适的系统线程上执行。原创 2020-04-14 17:11:18 · 1200 阅读 · 0 评论