Logo Ricky
  • Home
  • About
  • More
    Skills Experiences Education Projects
  • Posts
  • Notes
  • Activities
  • Running
  • English
    English Chinese
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • ACME
  • AI
  • Ansible
  • APP
  • BASH
  • Bayonet
  • Browser
  • Byte
  • Channel
  • Chart
  • Checklist
  • Chrome OS
  • CI
  • Cloudflare
  • Command Line
  • Config
  • Container
  • CPU
  • CURL
  • Data
  • Debug
  • Dmg
  • DNS
  • Docker
  • EFF
  • Emoji
  • EMQX
  • Extension
  • GIN
  • Git
  • Github
  • Gitlab
  • Gluetun
  • Go
  • Golang
  • Google
  • GraphQL
  • HTTP
  • Infra
  • Infrastructure
  • Introduction
  • Iso
  • ITerm2
  • Jsoniter
  • Kubernetes
  • Leetcode
  • Lightweight
  • Linux
  • Llm
  • Lua
  • Lullaby
  • Machinelearning
  • MacOS
  • Markdown
  • Module
  • MQTT
  • Music
  • NAS
  • Network
  • Nftables
  • NGINX
  • Ollama
  • Parquet
  • Prometheus
  • Protobuf
  • Proxy
  • Push
  • Python
  • QRCode
  • R
  • Redis
  • Regex
  • Rust
  • Security
  • SFTP
  • SHELL
  • Slides
  • Snow
  • Software
  • Ssh
  • String
  • Switch
  • Sync
  • Synology
  • Terminal
  • Test
  • Timeout
  • Tor
  • Trace
  • Travel
  • Tunnel
  • URL
  • Video
  • Visualization
  • VPN
  • VScode
  • Web
  • Youtube
  • Zero Trust
  • ZSH
  • 台語
Hero Image
channel 的 15 条规则和底层实现

channel 的 15 条规则和底层实现 操作规则 操作 nil 已关闭的 channel 未关闭有缓冲区的 channel 未关闭无缓冲区的 channel 关闭 panic panic 成功关闭,然后可以读取缓冲区的值,读取完之后,继续读取到的是 channel 类型的默认值 成功关闭,之后读取到的是 channel 类型的默认值 接收 阻塞 不阻塞,读取到的是 channel 类型的默认值 不阻塞,正常读取值 阻塞 发送 阻塞 panic 不阻塞,正常写入值 阻塞 编译规则 操作 channel 類型 結果 接收 只写 channel 编译错误 发送 只读 channel 编译错误 关闭 只读 channel 编译错误

Thursday, June 22, 2023 Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
Contact me:
  • zeyanlin@outlook.com
  • linzeyan
  • Ricky
  • Ricky