No. It makes no sense. Your threads would send conflicting commands (assuming they can get themselves understood) since they'd be sharing a comm channel and a session. For example, imagine if the second thread tried to start a transaction after the first one has already started one.
Have each thread create its own connection.
The reason for this is to create a web scrapper which runs several threads each using different proxy/network interface and each thread sleeps some time between requests to avoid ban.
Wait, what's the point of using threads if they're just going to sleep? Using threads in a scrapper only makes sense if you're querying different servers, but you said they're all querying one server.
Also, what's the point of using different proxies?
Update: Added bottom half
In reply to Re: Sharing DBI between threads
by ikegami
in thread Sharing DBI between threads
by bagent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |