README ¶ 并发编程 子程序 检查cpu核数 main.go 互斥锁 lock.go 通道 channel.go 协程+通道 routineChannel.go 通道监听(label/select/case) select.go 异常捕捉(defer/panic) deferPanic.go 生产者消费者 producerConsumer.go 定时器(timer) timer.go 定时任务(ticker) scheduleTask.go 任务队列(timer/ticker) taskQueue.go 使用 # 模块 go mod init xx # 依赖 go mod tidy # 单个运行 go run xx.go 或 go build xx.go + ./xx.exe # 整体运行 go build . 然后 ./xx.exe # 检查资源竞争 go build -race xx.go Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files channel.go deferPanic.go lock.go main.go producerConsumer.go routineChannel.go scheduleTask.go select.go taskQueue.go timer.go Click to show internal directories. Click to hide internal directories.