We've been experimenting with vert-x (fully async polygot app framework) in our organization for a while, and one of the things that we've been missing is a way to do async code in java.
I've been a happy user of when.js for a while (even include it as a base module in troopjs) so we decided to try to port as much as possible of when.js to java. The preliminary results are available now as englishtown/promises (possibly to be renamed to when.java in the future).
We have a few questions:
Cool! I actually came across some chatter about your port on google groups--might have been in the vert.x group--but hadn't really had time to take a close look. It sounds very interesting. I haven't thought about what a promise implementation might look like in Java, so I'd def like to take a look at what you've done.
As for license/attribution, yeah, MIT with attribution will be just fine. MIT is quite open, and freely allows derivative works, copying, modifying, etc.
I'll ping back after I've had a chance to look at englishtown/promises
Since I'm totally fine with your releasing yours as MIT with attribution, I'm gonna close this issue, but let's continue to discuss here as much as we want :)
I did finally have a chance to look at the java version. Pretty wild! It's interesting to see the extensive use of generics to deal with the value vs. promise, and the multiple variants of each method to deal with when.js's heavy use of optional arguments. Is the approach working out well in practice? esp. the value vs. promise situation?
Have you been using it in a heavily multithreaded application yet? I'd be interested to hear how well non-blocking promises fit in vs. the standard Java Future.