From: Ezra Zygmuntowicz Date: 2006-09-23T12:07:14+09:00 Subject: Re: Threading and the MySQL On Sep 22, 2006, at 2:56 PM, Frederick Cheung wrote: > Jeremy Kemper wrote: >> >> All the ruby threads are blocked during execution of the query. > I was rather fearing that would be the case > >>> If however I use the pure ruby mysql adaptor then I get a line of >>> output >>> every second even when the query is running, which is obviously >>> the more >>> desirable solution. >> >> >> See also ruby-talk:71672 >> >> The mysqlclient has no nonblocking API so you won't get the desired >> behavior >> until Ruby has native threads. For what it's worth, postgres offers a >> nonblocking API and the native gem (and Active Record) support it. >> >> Backgroundrb could be more robust in this respect by forking >> instead of >> threading jobs. >> > That would be nice. We've only really ran into this because of > backgroundrb, what with rails being single threaded. > > Fred I have a new version of backgroundrb that supports multi process workers with the same interface. Hoping to get it finished for release in the next week or so. -Ezra