Sha256: ebeaf4c0af44e89e6b0e8a2c13682318499a6c32d2ad56a582fd8af01fd9361c

Contents?: true

Size: 462 Bytes

Versions: 113

Compression:

Stored size: 462 Bytes

Contents

# encoding: utf-8

$LOAD_PATH.unshift 'lib'

require 'rubygems'
require 'eventmachine'
require 'mysql2/em'

EM.run do
  client1 = Mysql2::EM::Client.new
  defer1 = client1.query "SELECT sleep(3) as first_query"
  defer1.callback do |result|
    puts "Result: #{result.to_a.inspect}"
  end

  client2 = Mysql2::EM::Client.new
  defer2 = client2.query "SELECT sleep(1) second_query"
  defer2.callback do |result|
    puts "Result: #{result.to_a.inspect}"
  end
end

Version data entries

113 entries across 110 versions & 10 rubygems

Version Path
mysql2-0.3.21-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.3.21-x86-mingw32 examples/eventmachine.rb
mysql2-0.3.21-x64-mingw32 examples/eventmachine.rb
mysql2-0.3.21 examples/eventmachine.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/examples/eventmachine.rb
mysql2-0.4.0-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.4.0-x86-mingw32 examples/eventmachine.rb
mysql2-0.4.0-x64-mingw32 examples/eventmachine.rb
mysql2-0.4.0 examples/eventmachine.rb
mysql2-0.3.20-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.3.20-x86-mingw32 examples/eventmachine.rb
mysql2-0.3.20-x64-mingw32 examples/eventmachine.rb
mysql2-0.3.20 examples/eventmachine.rb
mysql2-0.3.19-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.3.19-x86-mingw32 examples/eventmachine.rb
mysql2-0.3.19-x64-mingw32 examples/eventmachine.rb
mysql2-0.3.19 examples/eventmachine.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/mysql2-0.3.18/examples/eventmachine.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/mysql2-0.3.18/examples/eventmachine.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/mysql2-0.3.18/examples/eventmachine.rb