From: Brian Candler Date: 2003-07-02T06:16:56+09:00 Subject: Re: DBD::Oracle9 and non-blocking mode On Wed, Jul 02, 2003 at 01:04:00AM +0900, Jim Cain wrote: > I'm about ready to make available an early copy of my library, but first > I have some questions regarding non-blocking mode. I've never actually > used this feature, so I'd like to hear from those that do how they use > it. Do you need more support for it beyond simply setting/resetting the > mode? What is the most convenient way for you to be notified that an OCI > call is still executing? When a call is still running, would you like to > call Statement#execute again to see if it's finished, or would you like > some other method? I have used it briefly: setting non-blocking mode on Takehiro's ruby-oci8 library, I was able to get several threads to run concurrent slow Oracle queries. It didn't need any special support for notification; I just let each thread block until its particular query had finished. (ruby-oci8 deals with this by polling the OCI library at increasing intervals until OCI says the query has completed, and then fetches the results) However, I wasn't particularly happy with this approach, so in the end I changed my application to run as multiple processes (in fact running under FastCGI, so Apache controls the number of processes which are spawned), each of which is a single thread so I don't care if OCI blocks. Regards, Brian.