On Wed, Oct 10, 2012 at 06:32:54PM -0700, Chris Buxton wrote:
> On Oct 10, 2012, at 1:21 PM, Jack Craig wrote:
> 
> > Hi DBI-Users,
> > 
> > I have a simple Perl program to open a file, db, serially read file, write
> > file records to db, close db, close file.
> > 
> > if, between the db open & close, given a single dbh, i create multiple
> > threads, each
> > reading a segment of the file and asynchronously writing to db using the
> > same dbh,
> > is that ok?
> 
> No. Each thread needs its own dbh. Your DBD may not support this.

Specifically, 
http://search.cpan.org/~timb/DBI-1.622/DBI.pm#Threads_and_Thread_Safety

Tim.

Reply via email to