Re: [svn:dbi] r13920 - dbi/trunk/lib/DBD
Tim Bunce <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.dbi.sybase.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Apr 23, 2010 at 05:57:29AM -0700, [email protected] wrote: > +use Config; > + > +our $threadid = 0; # holds private thread id of driver > > + $this->STORE (p_threadid => $threadid); > > +sub CLONE > +{ > + $Config{usethreads} && $INC{"threads.pm"} and > + $threadid = threads->tid (); > + } # CLONE > + > > + my $ownerid = $dbh->FETCH ("p_threadid"); > + $ownerid == $DBD::File::dr::threadid or > + croak "database handle is owned by thread $ownerid and this is $DBD::File::dr::threadid" The DBI method dispatch code already checks thread ownership of handles (see DBIc_THR_USER in DBI.xs) so is this really needed? Tim.