Sunday, April 21, 2013

[android help] Is it OK to use `scala.actors.Actor` object in an Android application?

Is it OK to use `scala.actors.Actor` object in an Android application? - Stack Overflow








Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















I know that it works, just checked. I'm wondering about the system not being able to free memory or the application "hanging" in the background or such things.



import scala.actors.Actor
import android.util.Log

object Player extends Actor {

start

def act {
loop {
react {
case x => Log.v("actor", "received: " + x)
}
}
}

}


Actors are so much more graspable than concurrency using regular threads. I guess scala.actors is build upon JVM threads, so maybe it's as legal as using normal threads in your app?


























You shouldn't be using native scala actors, as they're deprecated. But you can run AKKA on Android. You can see this thread for more information and sample code: https://groups.google.com/forum/?fromgroups=#!topic/akka-user/1W41nAONv90




















lang-scala







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...