The problem is not Perl, and the problem is not thread support in Perl. Ikegami explained the real problem in Re: Sharing DBI between threads: A single database connection can not know which of the various threads sends commands, thus the database gets confused or damaged. You need a dedicated database connection for each single thread, period. (And you need it in every language that allows you to use threads and a database connection.)
DBI WARNS not to use a threaded perl in a production environment. This does not mean DBI does not work with a threaded perl. It means that there MAY BE some issues with a threaded perl. You should perhaps read that warning as a better-safe-than-sorry warning: "it will very probably work as well, but we can not guarantee that as well as for a non-threaded perl". Every recent perl for Windows (with faked fork() support) is threaded, as are most perls built by the various Linux distributions. And all of those perls run pretty well with the DBI.
Perl has really unsafe features - for example it allows interchange of HASH references and integers without any warning even with `use strict;`
This sounds pretty strange, like a misunderstanding of some essential concepts of Perl. If not, could you show us a working example, and a copy of perl -V that exhibits that problem?
Alexander
In reply to Re^3: Sharing DBI between threads
by afoken
in thread Sharing DBI between threads
by bagent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |