mirror of
https://github.com/lloeki/normandy.git
synced 2025-12-06 10:04:39 +01:00
examples
This commit is contained in:
parent
1921f98e47
commit
5a968ac76c
11 changed files with 219 additions and 0 deletions
11
examples/channel_buffering.rb
Normal file
11
examples/channel_buffering.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# https://gobyexample.com/channel_buffering
|
||||
|
||||
require 'channel'
|
||||
|
||||
messages = Channel.new(2)
|
||||
|
||||
messages << 'buffered'
|
||||
messages << 'channel'
|
||||
|
||||
puts messages.recv
|
||||
puts messages.recv
|
||||
Loading…
Add table
Add a link
Reference in a new issue