* `concurrent-ruby` version: 1.1.7
* `concurrent-ruby-edge` used: yes
I am running this simple code and I see that select is not blocking on the channels and instead always looping which consumes full(single core) CPU.
require 'concurrent-edge'
Channel = Concurrent::Channel
string1 = Channel.new
string2 = Channel.new
loop do
Channel.select do |s|
s.take(string1) {
puts "string1"
}
s.take(string2) {
puts "string2"
}
end
end
I am running this simple code and I see that
selectis not blocking on thechannelsand instead alwaysloopingwhich consumes full(single core) CPU.