Green Threads


Download links are dead. Why not throw this on GitHub so it doesn’t get lost?

also, something I asked myself some time ago, what is the difference to quasar

From a brief glance at the quasar homepage, the lib by MatthiasM and Riven does one thing, green threads, and generally seems to be a lot simpler.

I had to do some emergency maintenance on that server, and due to the underwhelming user base of 1 or 2 souls, I haven’t bothered to bring my http server back up with my hobby projects. It’s a bit like my MappedObject library… everybody whining that Java doesn’t have structs, and upon release I got a buch of responses like this was a solution looking for a problem. Only theagentd gave it a serious whirl, for which I’m grateful, but it put the hours upon hours of work into perspective. I guess JGO is the wrong audience for this kind of tech, but at the same time I am not part of any other online community, so picking the right one might take even more time that I’m not willing to invest. Anyway, Nate, you’ve got a copy of the code, live the dream!

Hey toss them in my floundering grab-bag repo…50% of views are not from JGO (I’m not going to tell you the numbers though).

I think you’re right. Which is exactly why you should put it on GitHub.

@Riven: Most people here are just not hardcore low level programmers. I guess thats why we do Java and not just C++ like most game programmers v_v

Guess what, it was already on GitHub :slight_smile:

I could mavenize this and add it to our Jenkins instance. Same for the mapped buffer stuff. If only those things worked with Android/RoboVm, Stupid Android,

That’s just how it goes. Making something cool should be the reward on its own, though of course having others use it is great. There’s some minimum effort needed for people to be able to find and use your stuff, and that is basically 1) put it on GitHub and 2) have a single page of documentation saying what it is and telling how it is used.

Glad it’s on GitHub! I’d like to contribute docs at some point, in my signature one-page-is-all-you-need format.

I’ll see what I can do, I’m a pretty busy overlord, these days. :emo:

The single-page-of-documentation is basically the JGO thread, so maybe I’ll just rip pieces from it, trying to make it coherent.

Is it possible to dynamically create Dalvik code?

The thing is, this kind of cooperative multitasking is much easier to understand for a beginner. My guess is there are two problems: One people have no clue why it’s interesting and could make their lives easier in certain situations and (guessing here) the external ASM requirement might be a barrier.

Well, no, but there is no need for it either. There are both JIT and AOT pipelines for both the green-thread and mapped-object project. The issue however is that both rely on sun.misc.Unsafe, which is only partially implemented in Android – the missing methods are those featuring direct memory access for primitives, which is exactly what you’d need for the mapped-object project. I could rewrite the whole thing to make it possible to restrict support to float-fields, being backed by a float[], but it’s a tremendous amount of work.

That was a generic question outside of your libraries. Every so often I get tempted to toss together a compiler framework (so far I’ve avoid the temptation).

FWIW, I never had a chance to try out the code, only found the thread after it had been removed, but I found it very inspirational from a programming POV.

Hey, hey! Don’t forget that I use it in RuinsOfRevenge! :slight_smile:

I actually stopped working on that project, though there are people that look at the code and some even want to learn from it :slight_smile:

I thought nobody used or took a look at RuinsOfRevenge for a long time, too, but you never actually know so well, when you’ve got an open-source project. You might have much more users, than you think you have :slight_smile:

I cobbled together some docs and made a PR:


Docs here until merged:

This is an awesome tool, and I would certainly use it if it was available for Android. Is somehow possible to modify it so that it works in android? If it is please tell-me, and I will try to do it. Some tips & advices would be greatly appreciated as well. Thanks

Psst, Riven, if you click Merge on GitHub the project will have docs…

Thanks Nate, I merged your doc. The whole repo is a bit rough around the edges, it needs some serious work. To be honest I merely dumped some projects on GitHub as a backup. Don’t hold your breath, it might take a few weeks or months before I get 'round to it.