[Seaside-dev] hot to not use continuations

Sebastian Sastre ssastre at seaswork.com
Thu Apr 2 21:31:31 UTC 2009


Folks, just for the record:
I've found a cause of problems unless you're prepared:

I was using a block with ifCurtailed: wrapping the process of action and
rendering. By wrapping I mean someting about a filter depends on it.

Incidentally, the ifCurtailed: was basically there to make a rollback and/or
unlock any locked objects of a non flawless transaction.
So, to prevent surprises, developers must expect WAResponseNotification at any
time. This means that a non resumable notification will be triggered at any
moment when the action/render block is evaluated.

As it's not resumable, the block will be evaluating the ifCurtailed even when
all is perfectly fine.

The #ensure: feature depends on #ifCurtailed: so, I'm not sure yet but maybe
thats also the cause of this the ensures executing twice I'm seeing.

All this means that continuations has nothing to do with the issues I was
experimenting so I show reverence to those again. But, as I already get rid of
#call: in the app, not using those anyway :D

cheers,
sebastian

> -----Mensaje original-----
> De: seaside-dev-bounces at lists.squeakfoundation.org 
> [mailto:seaside-dev-bounces at lists.squeakfoundation.org] En 
> nombre de Sebastian Sastre
> Enviado el: Monday, March 30, 2009 15:27
> Para: 'Seaside - developer list'
> Asunto: RE: [Seaside-dev] hot to not use continuations
> 
> because I'm seeing crazy things like ensure blocks being 
> executed twice and
> ifCurtailed: blocks never executing that's why
> 
> 
> > -----Mensaje original-----
> > De: seaside-dev-bounces at lists.squeakfoundation.org 
> > [mailto:seaside-dev-bounces at lists.squeakfoundation.org] En 
> > nombre de Boris Popov
> > Enviado el: Monday, March 30, 2009 15:18
> > Para: Seaside - developer list
> > Asunto: RE: [Seaside-dev] hot to not use continuations
> > 
> > Why so hot? Granted, I haven't been following development 
> of 2.9 much,
> > so I know nothing about motivation for removing continuations 
> > aside from
> > ability to support Smalltalks that don't support them.
> > 
> > -Boris
> > 
> > -- 
> > +1.604.689.0322
> > DeepCove Labs Ltd.
> > 4th floor 595 Howe Street
> > Vancouver, Canada V6C 2T5
> > http://tinyurl.com/r7uw4
> > 
> > boris at deepcovelabs.com
> > 
> > CONFIDENTIALITY NOTICE
> > 
> > This email is intended only for the persons named in the 
> > message header.
> > Unless otherwise indicated, it contains information that is 
> > private and
> > confidential. If you have received it in error, please notify 
> > the sender
> > and delete the entire message including any attachments.
> > 
> > Thank you.
> > -----Original Message-----
> > From: seaside-dev-bounces at lists.squeakfoundation.org
> > [mailto:seaside-dev-bounces at lists.squeakfoundation.org] On Behalf Of
> > Sebastian Sastre
> > Sent: Monday, March 30, 2009 11:13 AM
> > To: 'Seaside - developer list'
> > Subject: [Seaside-dev] hot to not use continuations
> > 
> > hi there,
> > I'm testing not to use continuations in an app.
> > I've set:
> > - Main Class:  WAMain
> > - Action Phase Continuation Class: WAActionPhaseContinuation
> > 
> > interestingly, after setting that, the non stopping halt previously
> > mentioned started to halt.
> > Also I'm seeing in a filter (I've made for testing) this:
> > 
> > handleFiltered: aRequestContext
> > 
> > 	(super handleFiltered: aRequestContext) ifNotNilDo:[:response| 
> > 		self halt.
> > 		^ response].
> > 
> > it halts as expected but response has not aWAResponse, it 
> has aFilter
> > (itself).
> > What I'm missing about not using continuations?
> > thanks
> > sebastian
> > PD: that app is for testing. It's trivial: is just a component that
> > renders a title. No tasks, no #call:
> > 
> > _______________________________________________
> > seaside-dev mailing list
> > seaside-dev at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> > _______________________________________________
> > seaside-dev mailing list
> > seaside-dev at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> 
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev



More information about the seaside-dev mailing list