ibc/EventMachine-LE

100% CPU when using em-http-request

alexkwolfe opened this issue · 1 comments

It appears that there may have been a regression in c0b3bb2.

When running the below test, the CPU pegs at 100%. This behavior is not exhibited in the previous commit (dd57cef).

The problem does not appear to be related to the ruby version (it occurs both on ruby 1.9.3-p327 and on 2.0.0-p247).

Any idea what is causing this?

Gemfile

source 'https://rubygems.org'

# This version causes the CPU to peg at 100% when running the test
gem 'eventmachine-le', github: 'ibc/EventMachine-LE', ref: 'c0b3bb205274c557f014298b8bc1cbc14a8f76df'

# This version works correctly. The CPU does not peg at 100% when running the test
# gem 'eventmachine-le', github: 'ibc/EventMachine-LE', ref: 'dd57cefb952c2978250a6795313ff3fb56aeccba'

gem 'em-http-request'

#### Test
require 'bundler'

Bundler.require(:default)

EM.run {
  http = EM::HttpRequest.new('http://google.com').get
  http.callback {
    puts http.response_header.status
  }
  http.errback {
    puts http.response_header.status
  }
}
ibc commented

Sorry for the delay. The issue (CPU at 100%) does no longer happen in latest EventMachine-LE (1.1.6), most probably due to this commit:

#18