package
0.0.0-20240127131847-419a547088e1
Repository: https://github.com/yizhezhang-ervin/backend_golang.git
Documentation: pkg.go.dev

# README

并发编程

子程序

  1. 检查cpu核数 main.go
  2. 互斥锁 lock.go
  3. 通道 channel.go
  4. 协程+通道 routineChannel.go
  5. 通道监听(label/select/case) select.go
  6. 异常捕捉(defer/panic) deferPanic.go
  7. 生产者消费者 producerConsumer.go
  8. 定时器(timer) timer.go
  9. 定时任务(ticker) scheduleTask.go
  10. 任务队列(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

# Functions

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author