a couple more notes about async

This commit is contained in:
Brian Lopez 2010-04-07 10:47:16 -07:00
parent 5b1e0a261c
commit ccacb2de3c
1 changed files with 2 additions and 1 deletions

View File

@ -71,8 +71,9 @@ like EventMachine or even IO.select. Once the socket becomes readable, you can d
# result will be a Mysql2::Result instance
result = client.async_result
NOTE: Because of the way MySQL's query API works, this method will block until the result is ready no matter what.
NOTE: Because of the way MySQL's query API works, this method will block until the result is ready.
So if you really need things to stay async, it's best to just monitor the socket with something like EventMachine.
If you need multiple query concurrency take a look at using a connection pool.
== Compatibility