From 79f742908dd9ce1c4b26548a96967fd20aacd4a2 Mon Sep 17 00:00:00 2001 From: Lourens Naude Date: Sat, 1 Nov 2008 17:12:03 +0000 Subject: [PATCH] Use rb_thread_alone exclusively to determine if the query should be Thread scheduled --- ext/mysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysql.c b/ext/mysql.c index 84375c0..222e224 100644 --- a/ext/mysql.c +++ b/ext/mysql.c @@ -1035,7 +1035,7 @@ static void schedule_query(VALUE obj, VALUE timeout) } static int should_schedule_query(){ - return ( ( rb_thread_main() == rb_thread_current() ) && rb_thread_alone() ) != 1; + return rb_thread_alone() != 1; } /* async_query(sql,timeout=nil) */