Closed GildedHonour closed 3 years ago
The example taken from here https://github.com/ruby-concurrency/concurrent-ruby/blob/a5076bf9e977b290cce5a65b7b72810562bca295/docs-source/channel.md
irb(main):001:0> require 'concurrent' => true irb(main):002:0> puts "Main thread: #{Thread.current}" Main thread: #<Thread:0x00005581cd29b428 run> => nil irb(main):004:1* Concurrent::Channel.go do irb(main):005:1* puts "Goroutine thread: #{Thread.current}" irb(main):006:0> end Traceback (most recent call last): 4: from /home/alex/.rubies/ruby-3.0.0/bin/irb:23:in `<main>' 3: from /home/alex/.rubies/ruby-3.0.0/bin/irb:23:in `load' 2: from /home/alex/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>' 1: from (irb):3:in `<main>' NameError (uninitialized constant Concurrent::Channel)
Use require "concurrent-edge" as well.
require "concurrent-edge"
The example taken from here https://github.com/ruby-concurrency/concurrent-ruby/blob/a5076bf9e977b290cce5a65b7b72810562bca295/docs-source/channel.md