coroutine support

Rémi Forax forax at univ-mlv.fr
Thu Nov 19 11:09:00 PST 2009


Le 19/11/2009 19:32, Lukas Stadler a écrit :
> Hi!
>    

Hi Lukas,

> Rémi Forax wrote:
>    
>> Hi Lukas,
>> Your example doesn't work on my laptop:
>>      
> Ok, after I finally got everything running on Linux+Netbeans so that I
> can debug into the assembly code I was able to reproduce this. In one
> place I used Assembler.get_thread without a valid esp, which is totally
> fine on windows but not-so-good on Linux.
>    

Multi-OS dev is always a nightmare,
I am glad it's your problem and not mine :)

>    
>> public class FiberTest {
>>
>>    static class MyFiber extends Fiber {
>>      @Override
>>      protected Object generate(Object arg) {
>>        System.out.println("generate called with "+arg);
>>
>>        return null;
>>      }
>>    }
>>    ...
>> }
>>      
> If you want to call "yield" from within the generate method you should
> make it @Continuable.
>    

Could you re-explain where I have to put annotations and which one ?

> It should now also run fine without the javax.stack classes.
>    

Cool.

> cheers,
>   Lukas
>    

regards,
Rémi


More information about the mlvm-dev mailing list