I would like to do something in Java, which would be clear using a concurrent routine, but for which full threads have serious overkill The answer is, of course, it is used, but no Coroutine support is seen in standard Java libraries and a quick Google brings a tantalizing signal here or there, but nothing is enough.
Even what I have found:
- There is a coronet class, but it appears to be very heavy and looks, threads on points with. This means to reduce the complexity of full-threading, not to add it. Apart from this, I am not sure whether the classroom can be removed from the library and used independently.
- There is a coronetine set class which does stuff like Coratine, but then it is doubtful if it can be removed in a meaningful way. The overall library also feels that it has a tightly controlled form of thread pool Has been implemented in the form of no actual cortex
- It looks like what I am doing, but if anything seems more heavy than using threads. I am basically somewhat troubled that the software needs to change JVM bytecode on the runtime for its work dynamically. It looks like fluctuations and something that happens that will cause more problems than Coroutine. Apart from this, it seems that it does not apply to the entire cornean concept - from my eyes - it gives a
yield
which only gives the carrier to the appropriate Coratineyield
s This allows you to move directly to any known courtiin. Actually this library is similar to heavyweight and scary, only gives you support for itater, not completely normal courloin. - Promptly named fails because it is a solution of platform-specific (clearly JNI). / Li>
And this is what I have found all about.
I know about the native JVM support for coroutines in Da Vinci Machine and I also know about it to do. These are not really good solutions for me, however, as I do not necessarily know which vim or platform my code will go on (in fact any bytecok manipher system will have to face similar problems - if possible So it will be pure Java. For example, runtime bytecode manipulation will prevent me from using it on Android.)
Any hint? Is this also possible? If not, is it possible in Java 7?
Edit to add:
Just to ensure that the illusion is contained, it is an related The question is, but it is not unnecessarily in order to avoid changing the wheel again, it is looking for a existing implementation. Secondly, the question is about how to implement Coroutine in Java That question might be unnecessary. It is intended to put separate questions on different sources.
Edited to add:
Some comments, however, are in order. The library said that it is not a coronal library, so it does not technically answer my question. However, it is being said that there are two edges on the Google code project connected to it:
- Both solutions use bytecode manipulation, but selected library stable bytecode Allows manipulation which makes it usable for Android and other non-compatible JVM stacks.
- The Google code project does not complete chorotine, although the answer library does not do the courthouse at all, but it is more important than this: it's a good way to roll your own full-featured Coronetins Provides basic tools.
There is a continuation implementation, perhaps it will allow you to do this. However it uses biodegradation manipulation.
Anyway, it seems that you are trying to do OOP with plain C. It is possible but does not mean that you should do this.
Comments
Post a Comment