in reply to Re: Why use threads over processes, or why use processes over threads?
in thread Why use threads over processes, or why use processes over threads?
non reentrant nature of perl's coreThis non-reentrant nature of perl's core goes much deeper than many people realize. It's not that there's a bunch of function that are reentrant, and that perl now has to call the *_r equivalents. It goes deeper. Even things that on the Perl level are static are non-reentrant. Like fetching the value of a scalar. For instance, print $var can't be done in parallel, because $var might not have the pOK flag set, which means the Perl has to convert the numerical value of $var to a string value - which means that the underlaying datastructure is modified. (This is the reason why variables are not shared by default).
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Why use threads over processes, or why use processes over threads?
by BrowserUk (Patriarch) on Nov 11, 2003 at 14:22 UTC |