Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

concurrency --- albeit not at this scale --- is something that that you sometimes have to deal at a low level with when writing android apps. animating custom views, for example, often winds up involving direct use of Runnable s rather than (what i assume are) system-level AsyncTask s. a lot of the die-callbacks-die neatness on the java side of this relies on a coroutine library, but that library doesn't run on android. there is a continuation library that does > http://commons.apache.org/sandbox/commons-javaflow/ which could be used to create coroutines and from there user-level threads

... but if we just want some generic kind of concurrency-niceness on a java virtual machine, might it make more sense to use scala rather than write your own lightweight thread library? is the user-space thread implementation really necessary or even helpful if you're abstracting toward actors anyway? do these questions even make sense to anyone?



Quasar gives you fibers. On top of them you can build actors, Go-channels, or data flow variables.

Scala gives you no advantage here. None of its concurrency constructs really require Scala. There is no reason not to implement them in Java and use them in any JVM language. More specifically, Quasar actors are more general and powerful than Scala actors because they run in true lightweight threads and can block. Also, a lot of people don't like Scala.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: