|
»
Continuations not working with extracted method?
|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Continuations not working with extracted method?Hi!
I made a simple change of extracting while() loop in TestPause.PauseInWhile class. And immediately all the continuation stuff has stopped to work. Does it mean that I can't call pause not from execute method? PS I'm pasting the simple patch to check the behaviour: Index: C:/Tools/RifeCont/test/java/com/uwyn/rife/continuations/TestPause.java =================================================================== --- C:/Tools/RifeCont/test/java/com/uwyn/rife/continuations/TestPause.java (revision 2542) +++ C:/Tools/RifeCont/test/java/com/uwyn/rife/continuations/TestPause.java (working copy) @@ -34,14 +34,18 @@ public String execute() { int count = 5; - - while (count > 0) - { - pause("input"+count); - count--; - } - - return "success"; + + foo(count); + + return "success"; } - } + + private void foo(int count) { + while (count > 0) + { + pause("input"+count); + count--; + } + } + } } -- Regards, Mike |
|
|
Re: Continuations not working with extracted method?Hi Mike,
no, this is one of the only limitations of the current SVN version. Continuations only work in the entry method. In the first release we will add support for other methods too. The reason for this is that we initially wanted to test the stability of continuations in a limited scope. This has worked very well for already more than a year in production. Opening them up to other methods will bring along new possible problems and I wanted to be certain of the base first. In a couple of weeks I'll resume development on this. Best regards, Geert On 30-sep-05, at 15:16, Mike Aizatsky wrote: > Hi! > > I made a simple change of extracting while() loop in > TestPause.PauseInWhile class. And immediately all the continuation > stuff has stopped to work. Does it mean that I can't call pause not > from execute method? > > PS I'm pasting the simple patch to check the behaviour: > > Index: C:/Tools/RifeCont/test/java/com/uwyn/rife/continuations/ > TestPause.java > =================================================================== > --- C:/Tools/RifeCont/test/java/com/uwyn/rife/continuations/ > TestPause.java (revision > 2542) > +++ C:/Tools/RifeCont/test/java/com/uwyn/rife/continuations/ > TestPause.java (working > copy) > @@ -34,14 +34,18 @@ > public String execute() > { > int count = 5; > - > - while (count > 0) > - { > - pause("input"+count); > - count--; > - } > - > - return "success"; > + > + foo(count); > + > + return "success"; > } > - } > + > + private void foo(int count) { > + while (count > 0) > + { > + pause("input"+count); > + count--; > + } > + } > + } > } > -- > Regards, > Mike > _______________________________________________ > Rife-devel mailing list > Rife-devel@... > http://www.uwyn.com/mailman/listinfo/rife-devel > > -- Geert Bevin Uwyn bvba "Use what you need" Avenue de Scailmont 34 http://www.uwyn.com 7170 Manage, Belgium gbevin[remove] at uwyn dot com Tel +32 64 84 80 03 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net |
| Free embeddable forum powered by Nabble | Forum Help |
