I'm not up to the most current developments with DBI, but at least 6 months ago, the case was that you should not share DBI handles across threads, and at most one thread should do the database access, as the DBDs are in general not threadsafe, and DBI itself also isn't designed for use within threads.
If you only use one database connection ("the brain"), you can start more than one thread ("the zombies"), and you can pass the database connection around between the threads ("swap around the brain"). But only one thread can access the database connection at one time, and there might be some DBI function call you need to make so that DBI gets notified of the change in the current thread.
In reply to Re: DBI and threads
by Corion
in thread DBI and threads
by fd15k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |