[Seaside] Re: WAProcess>>critical:ifError problem
Esteban A. Maringolo
eMaringolo at smalltalking.net
Tue Nov 8 13:39:33 CET 2005
Without having found a solution to this problem, evaluating the
following code on a workspace, answers the expected value.
|value mutex block errorBlock |
block := [Processor sleep: 1000. 'Ey! I am not nil!'].
errorBlock := [Transcript show: 'Error!';cr].
mutex := Semaphore forMutualExclusion.
responseSem := Semaphore new.
process := [
[value := block on: Error do: errorBlock]
ensure: [responseSem signal]
process := nil.
^ value "display-it"
Perhaps the problem in WAProcess>>critical:ifError: is because
aBlock does some continuation stuff inside.
Can that be a reason?
Esteban A. Maringolo escribió:
> I'm having problems with the following method in WAProcess, on a Dolphin
> 5 Smalltalk:
> critical: aBlock ifError: errorBlock
> mutex critical:[
> responseSem := Semaphore new.
> process := [
> [value := aBlock on: Error do: errorBlock]
> ensure: [responseSem signal]
> ] fork.
> responseSem wait
> process := nil.
> ^ value
> After evaluating aBlock value gets its contents (a WAResponse).
> But when the mutex ends the critical evaluation, value is nil.
> Perhaps it has something with the Continuations that happens inside the
> process, or something similar.
> What can be causing this?
> This message is cross posted to Seaside list, and Dolphin newsgroup
> Best regards,
More information about the Seaside