This content has been marked as final. Show 2 replies
kitfox wrote:You're correct.
I'd like to be able to use coroutines in Java (http://en.wikipedia.org/wiki/Coroutine), but as far as I can tell Java does not currently support this.
I've come across a few projects that will provide coroutine-like abilities by modifying your byte code, but I'm afraid that this would not be very portable.Apparently there are some that break bytecode portability and others that don't.
Is there any way to implement coroutines in Java?You just mentioned ways.
Is this a feature which may be added to a future Java release?Possibly, but I wouldn't hold my breath. If you want to use coroutines now, I'd suggest you choose a language that supports them.
Kayaman wrote:According to that wikipedia page, C# supports it. That is at least a language that is very similar to Java. Of course the platform is totally different and Microsofty.
Possibly, but I wouldn't hold my breath. If you want to use coroutines now, I'd suggest you choose a language that supports them.