You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Eric Gulatee <er...@gmail.com> on 2005/05/15 19:53:53 UTC

Re: JavaFlow

> > I've noticed a few items with javaflow from svn under jakarta, when
> > you suspend the continuation, the thread continues executing.  I
> > believe the old javaflow blocked the thread.  With the new javaflow
> > how can you then resume where you "suspended"?

> This is most likely because you are going the "2.1 way"
> of using javaflow.
>
>Javaflow can now be used in two different ways - well
> to be exact three different ways.
>
> The old synchronous way where the rewriting is done inside
> the classloader. And now there is the asynchronous one where
> you point your javaflow to monitor your classes or your sources
> directory. I am not yet sure which way we should settle on.
> This depends a bit on the development vs deployment factor.

I've been going thru commons-javaflow pretty impressive.  :)  I think
I have a deeper understanding what's going on.

I'll stick with the Asynchronous class loader, I will try to make some
changes to it, so it uses ASM instead of BCEL since the use of
Annotations would simplify my dev.  If I ever get to that point, I'll
ask how to submit a patch.

Now digging into Continuations, I'm still perplexed, once you call
suspend(), aside from capturing the stack, nothing happens, the thread
continues execution.
Shouldn't forminstance/abstractcontinuable be stopping the current thread?

Otherwise this means that loops & business logic will get invoked. 
And It's a rather large pain to detect if the continuation is
suspended in the javaflow code and not execute logic.

Cheers,
Eric.

Re: JavaFlow

Posted by Torsten Curdt <tc...@apache.org>.
> I'll stick with the Asynchronous class loader, I will try to make some
> changes to it, so it uses ASM instead of BCEL since the use of
> Annotations would simplify my dev.  If I ever get to that point, I'll
> ask how to submit a patch.

Actually I would like to look into that as well.
I just don't like the current rewriting code.

> Now digging into Continuations, I'm still perplexed, once you call
> suspend(), aside from capturing the stack, nothing happens, the thread
> continues execution.

Yes and no :)

> Shouldn't forminstance/abstractcontinuable be stopping the current thread?

The idea is that once suspend is called you return
from the method immediatly. Same goes for all
consecutive calls on the callstack.

> Otherwise this means that loops & business logic will get invoked. 
> And It's a rather large pain to detect if the continuation is
> suspended in the javaflow code and not execute logic.

You don't have to worry about that :)

As a side effect of contributing to a
to a research paper I've written some
documentation. Will put that online soon.

That should help to get you started and
seeing the full picture.

Thanks for your participation!

cheers
--
Torsten