Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Fork-safe DBI handles via ChildHandles and InactiveDestroy

by sgt (Deacon)
on Jun 07, 2007 at 12:39 UTC ( [id://619798]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Fork-safe DBI handles via ChildHandles and InactiveDestroy
in thread Fork-safe DBI handles via ChildHandles and InactiveDestroy

A few months ago, to make a point about some of the pitfalls of fork and IO, I wrote a few tests to show the potential problems (from a Un*x perspective following the R. Stevens books for instance), and all my tests were negative in the sense that (at least on cygwin -- I think I tested HP-UX which has been my perl platform for years, but I cannot remember for sure) implicit flushing was going on ...It would be interesting to know how much perl departs from Un*x on this (and since when).

In general for this kind of problem, maybe the best way to go is a process manager maintaining a pool of processes each one with one DB connection, and some protocol to reach the process manager. Anyway I find the "forks" module interesting.

cheers --stephan
  • Comment on Re^3: Fork-safe DBI handles via ChildHandles and InactiveDestroy

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://619798]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-10-09 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (44 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.