From edff42ab2cbba947ea0c8302cc64ba2fae0446e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Jan 2009 11:18:33 -0700 Subject: [PATCH] use c_async_query by default --- TODO_LIST | 3 +++ lib/mysqlplus.rb | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/TODO_LIST b/TODO_LIST index 740ff2c..7b1bf78 100644 --- a/TODO_LIST +++ b/TODO_LIST @@ -5,3 +5,6 @@ Is there a quick, cheap, easy way to test for writability so we don't have to us Docs for how to use with rails, etc. [there is mysqlplus_adapter, so maybe we're good there]. Merge in lourens' branch -- I like the double check for not using send_query twice in a row! [rdp] + + +critical todo list: diff --git a/lib/mysqlplus.rb b/lib/mysqlplus.rb index aa2490a..fe67327 100644 --- a/lib/mysqlplus.rb +++ b/lib/mysqlplus.rb @@ -2,11 +2,13 @@ require 'mysql' class Mysql - def async_query(sql, timeout = nil) + def ruby_async_query(sql, timeout = nil) # known to deadlock TODO send_query(sql) select [ (@sockets ||= {})[socket] ||= IO.new(socket) ], nil, nil, nil get_result end + + alias_method :async_query, :c_async_query end