Sha256: 410939de7a94ccfc0086b13ee460d1380c0a333a50ab255c29f60115f71d9a2d

Contents?: true

Size: 327 Bytes

Versions: 100

Compression:

Stored size: 327 Bytes

Contents

require 'em_test_helper'

class TestDefer < Test::Unit::TestCase

  def test_defers
    n = 0
    n_times = 20
    EM.run {
      n_times.times {
        work_proc = proc { n += 1 }
        callback = proc { EM.stop if n == n_times }
        EM.defer work_proc, callback
      }
    }
    assert_equal( n, n_times )
  end

end

Version data entries

100 entries across 100 versions & 6 rubygems

Version Path
sensu-em-2.7.0-java tests/test_defer.rb
sensu-em-2.6.0-java tests/test_defer.rb
eventmachine-1.0.9.1 tests/test_defer.rb
eventmachine-1.0.9.1-java tests/test_defer.rb
eventmachine-1.0.9-java tests/test_defer.rb
eventmachine-1.0.9 tests/test_defer.rb
eventmachine-1.0.8 tests/test_defer.rb
eventmachine-1.0.8-java tests/test_defer.rb
sensu-em-2.5.2-java tests/test_defer.rb
sensu-em-2.5.2 tests/test_defer.rb
sensu-em-2.5.1-java tests/test_defer.rb
sensu-em-2.5.1 tests/test_defer.rb
sensu-em-2.5.0-java tests/test_defer.rb
sensu-em-2.5.0 tests/test_defer.rb
sensu-em-2.5.0.beta-java tests/test_defer.rb
sensu-em-2.5.0.beta tests/test_defer.rb
eventmachine-1.0.7 tests/test_defer.rb
eventmachine-1.0.7-java tests/test_defer.rb
sensu-em-2.4.1-java tests/test_defer.rb
sensu-em-2.4.1 tests/test_defer.rb