|
»
Continuations
|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
ContinuationsGeert,
Got it almost completely working. I don't know how reusable this code will be though, as EngineClassLoader does many things besides just continuation support. I think we should break the responsibilities up, such as ContinuationClassLoader, CompilingClassLoader, etc. Anyway, the only problem I have now is that I think the pause() method should take an argument (String) and I want to pass that string back through the PauseException that is thrown, either directly or within the ContinuationContext. This would be needed in WebWork to tell it what result to render. Any idea how to do that? I'm looking at the bytecode/ASM logic, but it is a little confusing as the pause() method is popped off right away, so i'm not sure how to get a handle on that parameter. |
|
|
Re: ContinuationsHi Patrick,
> Got it almost completely working. I don't know how reusable this code Great! > will be though, as EngineClassLoader does many things besides just > continuation support. I think we should break the responsibilities up, > such as ContinuationClassLoader, CompilingClassLoader, etc. I was actually not planning on making it reusable on classloader level. Imho RIFE/continuations should extract the code from EngineClassLoader from line 389 until 430 into a ContinuationInstrumentor class or something like that. Like this, the actual functionality can be used anywhere. > Anyway, the only problem I have now is that I think the pause() method > should take an argument (String) and I want to pass that string back > through the PauseException that is thrown, either directly or within > the ContinuationContext. This would be needed in WebWork to tell it > what result to render. I think that should be abstracted a bit better then. Maybe we should support any kind of parameters dynamically, since RIFE doesn't need any, Webwork needs a String, another framework might need something else. The check here: if ("pause".equals(name) && "()V".equals(desc)) could just look for the method name and parse the description to find out what parameters are actually used. ASM's Type class can help a lot here. The parameters can then be put into an Object array (null if there are no parameters) and provide that to PauseException. > Any idea how to do that? I'm looking at the bytecode/ASM logic, but it > is a little confusing as the pause() method is popped off right away, > so i'm not sure how to get a handle on that parameter. Look at how the call method is handled, you can use this to retrieve the parameter and afterwards pop the method call off. mMethodVisitor.visitVarInsn(ASTORE, mCallNameIndex); Can you give me a preferred login and password so that I can setup a Subversion account for you and RIFE/continuations? Like this I can see where you're going and make quick changes if I see the need for them. Best regards, Geert -- 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 |
