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.0.0 tests/test_defer.rb
sonixlabs-eventmachine-java-1.0.0.rc.7-java tests/test_defer.rb
eventmachine-le-1.1.6 tests/test_defer.rb
eventmachine-le-1.1.5 tests/test_defer.rb
eventmachine-1.0.3-x86-mswin32-60 tests/test_defer.rb
eventmachine-1.0.3-x86-mingw32 tests/test_defer.rb
eventmachine-1.0.3-java tests/test_defer.rb
eventmachine-1.0.3 tests/test_defer.rb
eventmachine-1.0.2-java tests/test_defer.rb
eventmachine-1.0.2-x86-mswin32-60 tests/test_defer.rb
eventmachine-1.0.2-x86-mingw32 tests/test_defer.rb
eventmachine-1.0.2 tests/test_defer.rb
eventmachine-1.0.1-x86-mswin32-60 tests/test_defer.rb
eventmachine-1.0.1-x86-mingw32 tests/test_defer.rb
eventmachine-1.0.1-java tests/test_defer.rb
eventmachine-1.0.1 tests/test_defer.rb
eventmachine-maglev--1.0.0 tests/test_defer.rb
sonixlabs-eventmachine-java-1.0.0.rc.5-java tests/test_defer.rb
eventmachine-le-1.1.4 tests/test_defer.rb
eventmachine-le-1.1.4.beta.2 tests/test_defer.rb