mysql2/ext
Eric Wong ec00873181 make Mysql2::Client destructor safely non-blocking
Since sending a QUIT message to the MySQL server is more of a
formality than a hard requirement in a TCP-based protocol, we'll
just fire-and-forget the message to avoid any chance of blocking
the interpreter during the GC finalizer phase.  Since the socket
will be closed immediately afterwards, there's no long-term
side-effects from making the socket non-blocking.

We do this instead of using rb_thread_blocking_region because
the GVL is already destroyed by the time the ObjectSpace
finalizers are called under 1.9.
2010-05-10 14:16:53 -07:00
..
extconf.rb wrap mysql_real_connect with rb_thread_blocking_region 2010-05-05 11:57:37 -07:00
mysql2_ext.c make Mysql2::Client destructor safely non-blocking 2010-05-10 14:16:53 -07:00
mysql2_ext.h make Mysql2::Client destructor safely non-blocking 2010-05-10 14:16:53 -07:00