in reply to Objects and forking
Will each instance of $mailer in the children actually be the same object affecting the same data or will they be their own seperate entity containing only the data populated in $mailer up to the point of forking?
The latter.
I think tilly was warning you against letting each child use the same connection. They would use the same connection if the connection was opened prior to the fork. You can prevent them from sharing a connection by opening any connections after forking. (I'm not even sure you are opening any connections at all, for that matter.)
In other words, if in one child I change/add something via a $mailer method, will it affect the other processes?
No. It won't.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Objects and forking
by gnu@perl (Pilgrim) on Jul 11, 2003 at 13:40 UTC |