On Fri, 12 Apr 2002, Stas Bekman wrote:
 
> But if talk about futuristic Solar variables (perl globals shared 
> between threads). what if a solar variable is a reference to CODE? Can 
> this be shared? If so, will reloading this variable in one interpreter 
> affect others?

even if that would work, it would kill performance due to required mutex 
locking.  and that locking would need to happen in the perl core, unlike
simple scalars, arrays and hashes.

> Also if we put the sharing aside for a moment and assuming that we have 
> a pool of interpreters with idle interpreters in it, there can be a 
> thread that monitors changed modules and update the idle interpreters by 
> making them reload the code and put them in the head of the list. This 
> should save the overhead of reloading during a request. Does this make 
> sense?

there already is a plan to have a low-priority thread that monitors idle 
interpreters.  this would be a pluggable interface, so you can do whatever 
you want with the interpreter via callback hooks.  but that'll all wait 
until well after everything else is solid with ithreads, including and 
most important: perl 5.8.x

Reply via email to