Sha256: 2dc920ca5f6fda416d68ee03e6d7a5861e90a0745611c53398f69d5f41eab733

Contents?: true

Size: 444 Bytes

Versions: 12

Compression:

Stored size: 444 Bytes

Contents

$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

12 entries across 12 versions & 1 rubygems

Version Path
mysql2-0.5.2-x64-mingw32 examples/eventmachine.rb
mysql2-0.5.2-x86-mingw32 examples/eventmachine.rb
mysql2-0.5.2-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.5.2 examples/eventmachine.rb
mysql2-0.5.1-x64-mingw32 examples/eventmachine.rb
mysql2-0.5.1-x86-mingw32 examples/eventmachine.rb
mysql2-0.5.1-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.5.1 examples/eventmachine.rb
mysql2-0.5.0-x64-mingw32 examples/eventmachine.rb
mysql2-0.5.0-x86-mingw32 examples/eventmachine.rb
mysql2-0.5.0-x86-mswin32-60 examples/eventmachine.rb
mysql2-0.5.0 examples/eventmachine.rb