in reply to Multithreading DBI error

Just like the error message says, it's simple to avoid it. Don't mix threads and DBI, or at least, do not share statement handles between threads.

One approach to have both, threads and DBI is to create the statement handle in the thread that will be using it instead of creating it outside.