SkillAgentSearch skills...

Normandy

Channels for CSP style Ruby

Install / Use

/learn @lloeki/Normandy
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated3y ago
Forks0

Languages

Ruby

Security Score

55/100

Audited on Jan 19, 2023

No findings