[ruby-oci8-devel] Support FAN in Ruby-OCI8

shiwei zhang shiwei.zhang at oracle.com
Tue Jul 1 06:55:43 EDT 2008


Hi Kubo,

KUBO Takehiro wrote:
> Hi,
>
> On Fri, Jun 27, 2008 at 5:40 PM, shiwei zhang <shiwei.zhang at oracle.com> wrote:
>   
>> Hi,
>>
>> I've successfully tested the FAN functionality in my environment. The steps
>> are as below:
>>     
>
> Great!
>
>   
>> 3. Make the Ruby-OCI8 linked with a threaded library and make it in
>> OCI_EVENT mode.
>>     
>
> Is it libpthread?
>   
No, it's a multi-threaded environment created by OCI8 library. The OCI8 
will automatically spawn a new thread when necessary (e.g., spawn a 
listening thread to accept events). It'll be linked with the threaded 
library if:
1) The Oracle Full Client/Instant Client is 10g or above (I haven't 
checked whether 9i also supports).
2) The mode "OCI_THREADED" is set up when the program initializes the 
OCI8 environment.
> If a C macro HAVE_NATIVETHREAD is defined, the ruby is configured
> with '--enable-pthread' option and is linked with libpthread.
> You have no need to link it for oci8lib.so.
>
> #if HAVE_NATIVETHREAD /* defined in ruby.h */
>  ... enable FAN by user configuration...
> #else
>  ... disable FAN ...
> #endif
>
>   
>>                 (I worked out a patch to do this but you know for some
>> reason currently it's not merged into Ruby-OCI8. ;-) )
>>     
>
> Did you send me the patch? I don't remember it. If it have no problem,
> could you commit it by yourself?
>   
No, I haven't sent the patch to you yet :-( . I am finding an 
appropriate way to submit it to you.

Thanks & Best Regards,
Shiwei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ruby-oci8-devel/attachments/20080701/3969dc11/attachment.html>


More information about the ruby-oci8-devel mailing list