[Seaside] [Issue 553] #isolate: broken - any updates?
jfitzell at gmail.com
Tue Jul 20 08:16:15 UTC 2010
On Tue, Jul 20, 2010 at 8:36 AM, Reza Razavi <razavi at acm.org> wrote:
> At 07:45 20/07/2010, AA wrote:
>> Yes, it would certainly be useful to me.
>> It's a useful (arguably, essential) function: consider the processing of
>> credit card payments, or logging out of a session...
> Hello Julian, all,
> I share the above observations.
> PS: My apologies for the delayed response.
I agree that preventing a user from processing a credit card payment
twice or going "back" into a logged-out session are reasonable
requirements. That's not really the question, though, because
#isolate: is only one of a probably endless variety of possible
solutions to that problem.
For session logout, for example, you could simply unregister the
session or set whatever property was holding the current user to nil.
For the credit card case you could, for example, have a WAIsolatedTask
that only allowed itself to be run once and put the appropriate code
in a subclass of that. (actually... hmm.... that might be a way to
implement #isolate:... need to look into that)
The only reason you might need #isolate: is that you can use it to
*implicitly* protect just *part* of a Task #go method or a callback.
What I'm wondering is how important those two aspects of the solution
are. If only a half dozen out of thousands of users are asking for it,
it's hard to justify classifying it as "essential".
More information about the seaside