in reply to I too don't like Perl 5.8.2 threads

Hmm.. havent tried your code, but maybe its either that DBI/DBD::Oracle isnt thread aware, or just that trying to connect to Oracle 50 times more or less simultaneously is buggy.. You could try putting a sleep(rand(20)) in that do_db sub, and see if that helps.

Im not quite sure what that second snippet is trying to do with the $orashr variable, but if its passing it to get the dbh set as a shared variable, its probably not going to work, because of the problems sharing objects..

C.

  • Comment on Re: I too don't like Perl 5.8.2 threads

Replies are listed 'Best First'.
Re: Re: I too don't like Perl 5.8.2 threads
by fx (Pilgrim) on Jan 06, 2004 at 21:20 UTC

    maybe its either that DBI/DBD::Oracle isnt thread aware

    One of my previous posts references both the DBI and the DBD::Oracle docs and the fact that they both should be thread safe with Perl 5.8.something.

    Im not quite sure what that second snippet is trying to do with the $orashr variable

    Basically, the DBD::Oracle docs describes the $orashr var as a way to share a single db connection across multiple threads.