[Seaside] Re: Render loop... not looping

Julian Fitzell julian at beta4.com
Tue Nov 8 20:20:29 CET 2005

Esteban A. Maringolo wrote:
> Julian Fitzell escribió:
>> It's just using the exception mechanism to obtain dynamic variable 
>> scope...  the value can be provided from anywhere up the call chain.
>> Esteban A. Maringolo wrote:
>>> The curiosity I have is why WACurrentSession is an Exception! It 
>>> seems to be pretty useful, considering the flow of continuations, but 
>>> I would like to hear (read) the explanation from the author.
> Thanks Julian.
> And what is the purpose of the critical:ifError: method?
> Why it uses a mutex and forks the evaluation of the block?

It's designed to ensure that only one request is evaluating within a 
session at a time.  This is desirable because otherwise everything would 
need to be written to support concurrency.  In fact, given that we are 
reverting object instvars back and forth to handle continuations this is 
pretty important even at the system level.  As it stands, that semaphore 
ensures you only need to worry about concurrent access of resources that 
are accessed by more than one session (db, etc).


More information about the Seaside mailing list