in reply to DBI and threads
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI and threads
by fd15k (Novice) on Jan 26, 2005 at 21:25 UTC | |
by Corion (Patriarch) on Jan 26, 2005 at 21:35 UTC | |
by perrin (Chancellor) on Jan 26, 2005 at 22:48 UTC | |
by dragonchild (Archbishop) on Jan 27, 2005 at 13:44 UTC | |
by perrin (Chancellor) on Jan 27, 2005 at 16:07 UTC | |
by fd15k (Novice) on Jan 26, 2005 at 22:01 UTC |