Skip to content

concurrent-ruby-edge Channel.select consumes full(single core) cpu #883

Description

@adityacs
* `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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions