cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Weird multithreading bug in Cron block
Date Thu, 09 Jun 2005 18:39:43 GMT
Sylvain Wallez wrote:
> Vadim Gritsenko wrote:
> 
>> Anyways, RunnableManager's pools MUST NOT inherit any variables, IMHO. 
>> I think you meant the same.
> 
> 
> Exactly. And my modifications ensure this CAN NOT happen, by simply 
> suppressing the automatic inheritance of environment stack between child 
> threads and their parent.

Ok, Good. But now there is an incompatibility - hope you mention it at least in 
status file.


> For places where we *need* inheritance to happen such as in parallel 
> include transformer, we now MUST use CocoonThread that does the 
> environment stack copy, thus preserving the information needed to 
> correctly resolve URIs in background threads. And in that case, we 
> cannot use RunnableManager since its threads don't (and shouldn't) 
> inherit the environement stack.

IncludeTransformer does not rely on inheritable thread locals, as it is now. It 
used to, though.


>> What's missing? :-?
> 
> The asynchronous nature of threads combined with the create-on-demand 
> behaviour of pools.

Gotcha.

Vadim

Mime
View raw message