Coro in Java 8
Rémi Forax
forax at univ-mlv.fr
Wed Apr 27 12:54:14 PDT 2011
On 04/27/2011 08:33 PM, Charles Oliver Nutter wrote:
> I think it's time to start talking about what we'd need to do to get
> coroutines in Java 8.
>
> In the absence of forking, lightweight processes, or M:N threading,
> there's no efficient way to implement a large set of problems that
> demand fiber/coroutine-like behavior. Add to that the fact that
> languages like Ruby and Erlang already want for "fibers", and in JRuby
> and Erjang we have to hack around the JVM to support them.
>
> With the narrowing of Lucas's patch to downstream coroutines (rather
> than unbounded continuations) I believe most of the concerns about
> security have been addressed. Or at least, enough of those concerns
> have been addressed that we need to get this patch in front of more
> people to find new concerns.
>
> So, I guess what's needed would be at least a JSR, which then needs
> someone to lead it (I don't think we'd have much trouble getting
> people to participate).
>
> Any thoughts on trying to push coro through to Java 8 as an official
> feature? I'm convinced it needs to happen.
Yes, 100% agree.
Coroutine can also be used to implement generators in Java,
introducing yield in the release that introduce lambda make a lot of
sense for me.
> - Charlie
Rémi
More information about the mlvm-dev
mailing list