Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 00f2debdab
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (15 sloc) 0.327 kB
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
Jump to Line
Something went wrong with that request. Please try again.