Normandy
Channels for CSP style Ruby
Install / Use
/learn @lloeki/NormandyREADME
Channels for ruby
A complete implementation of channels for Ruby, including size and close.
How?
The usual gem insall channel, or gem channel in your Gemfile.
require 'channel'
c = Channel.new
go -> { c << 'Hello, world!' }
puts c.recv
Why?
While some packages already exist, many fail at providing a thorough
implementation, often limited to send/recv, and most critically, all
missing close support. A complete implementation makes channels much more
useful, as most patterns rely much more details than simply send/recv.
To prove this point and to serve as a nice tutorial anyway, some examples ported over from Go by example are included in examples.
- [X] channels
- [X] channel buffering
- [X] channel synchronization
- [X] channel direction
- [X] select
- [X] timeouts
- [ ] non-block channel operations
- [X] closing channels
- [X] range over channels
License
MIT
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
