Use rb_thread_alone exclusively to determine if the query should be Thread scheduled
This commit is contained in:
parent
57712a64e6
commit
79f742908d
@ -1035,7 +1035,7 @@ static void schedule_query(VALUE obj, VALUE timeout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int should_schedule_query(){
|
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) */
|
/* async_query(sql,timeout=nil) */
|
||||||
|
Loading…
Reference in New Issue
Block a user