ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-dbi-dev
perl-dbi-dev
Perl/mod_perl/DBI: To thread, or not to thread
by Patrick Galbraith other posts by this author
Sep 11 2008 6:07PM messages near this date
ANNOUNCE: IBM DB2 Database Driver for Perl DBI Version 1.2 released | Considering an SQLite-specific CPAN Module
Hi all,

I'm currently working on... of all things, a book on book about web app 
programming with perl/apache/mysql, and I'm trying to explain what 
Ubuntu packages to use for installation (and I'm sure other Linux 
variants same applies)

Ubuntu gives you:

apache2-mpm-prefork
apache2-prefork-dev
apache2-mpm-worker
apache2-threaded-dev 

I've used both prefork and worker (as of late, due to concerns with 
forking), both of which seem to work fine. Though, the DBI documentation 
warns of caveats of using threaded, especially if the client is not 
thread safe (I always compile mysql with a thread-safe client, and 
DBD::mysql against that thread safe client).

So... I'm trying to decide if I should explain

1. There are issues with using threads - what all are they?
2. What they should use- prefork or worker?
3. What is the consensus?
4. Is there a document available giving the pros and cons?
5. What is the official state of Perl with regards to threading?

As an author, I'm thinking I don't want to give advice, only inform.

Thanks for you inputs, advice, suggestions, etc.

-- 

Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved