This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Home
Welcome to the asymy wiki!
EventMachine::run {
c = Asymy::Connection.new(:target => "localhost",
:port => 13306,
:username => "user",
:password => "pass",
:database => "mysql")
c.exec("show databases") do |fields, rows|
pp fields
pp rows
end
}
an example of doing many asynchronous queries: [without using threads]
conns = 0.upto(20).map {|i| Asymy::Connection.new(opts)}
0.upto(10) do |i|
conns[i].exec("select * from huge_table") {|cols, rows| pp [i, rows.size]}
end
0.upto(10) do |i|
conns[10+i].exec("select COUNT(*) from tiny_table") {|cols, rows|
pp [i, rows.size]
}
end
Last edited by rogerdpack, 3 months ago
Versions:





