"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Is there a reason you can't share one $dbh for all children? (I think this is possible with Parallel::ForkManager.) No, it is not possible. Reason: Think of two childs, both want to make a query:
# Child 1: Now, both send their queries at the same time. The db server might receive: SELECT * FROSELECT grzbaka FROM baM foobar WHERE baz = 3z WHERE foo = 5 Of course, reality is more complex, this example is just meant as a simple explanation why one db connection used by many childs don't work (as expected). BTW, if you do cooperative multitasking, like POE does, everything is ok -- there is only one process which sends data to the db server. In reply to Re^2: Parallel::ForkManager, DBI using memory
by iblech
|
|