Sha256: 90c9f6ac474c363f05dbafe033edf6ae617a95b673c1c14dedbaabcb2b7903f4

Contents?: true

Size: 619 Bytes

Versions: 15

Compression:

Stored size: 619 Bytes

Contents

require File.join(File.dirname(__FILE__),'api','api_helper')

# these specs are executed only with Async support
if not defined?(JRUBY_VERSION)
  describe "BasicEventMachineTest with Threads" do
    it "should run EventMachine gracefully and schedule callback execution in thread" do
      f = Fiber.current
      operation = proc { res = 1 }
      operation_res = 0
      callback = proc { |proc_res| operation_res = proc_res; f.resume }
      EventMachine.defer operation, callback
      Fiber.yield
      # this code should be executed only after the thread's return
      operation_res.should == 1
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rhoconnect-7.6.0 spec/async_spec.rb
rhoconnect-7.5.1 spec/async_spec.rb
rhoconnect-7.4.1 spec/async_spec.rb
rhoconnect-7.1.17 spec/async_spec.rb
rhoconnect-6.2.0 spec/async_spec.rb
rhoconnect-6.0.11 spec/async_spec.rb
rhoconnect-5.5.18 spec/async_spec.rb
rhoconnect-5.5.17 spec/async_spec.rb
rhoconnect-5.5.15 spec/async_spec.rb
rhoconnect-5.5.0.22 spec/async_spec.rb
rhoconnect-5.5.2 spec/async_spec.rb
rhoconnect-5.5.0.7 spec/async_spec.rb
rhoconnect-5.5.0.3 spec/async_spec.rb
rhoconnect-5.5.0 spec/async_spec.rb
rhoconnect-5.1.1 spec/async_spec.rb