cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <>
Subject Re: flowscript and infinite loops
Date Fri, 20 Aug 2004 18:11:15 GMT
Samuel Tribehou wrote:

> Hello, 
> I know this is a silly question, but..
> I'd like to know what happens exactly in memory with this type of flow : 
> flowscript_func ()
> {
>      while (true)
>     {
>        cocoon.sendPageAndWait("/example");
>       // do things with user input
>     }
> }
> Of course the purpose is  to load the page, have the user 
> enter data and do things with it, then reload the updated page, etc...
> But what happens when the user clicks a link which leads him to another form
> (and another flowscript loop) ? Will the previous loop continue to wait  for 
> sendPageAndWait() to return and leak some memory ?

Remember, the execution is halted at sendPageAndWait(), so nothing is 
really "running" at that point.  Only when <map:call continuation=""/> 
  is called, will the execution resume.

If the user clicks on a different link and "loses" the continuation 
ID, the continuation will still be around (i.e. it can be restarted), 
until it expires and is cleaned up after a while by the 

If you managed to keep track of the continuation IDs, the user could 
even switch back and forth between the loops.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message