Hi,

Scala.Rx (for the most part) doesn’t care about threading, i.e. events are 
propagated eagerly on the thread where you trigger them.
A guaranteed way to run something on background is to wrap it in a Future 
and import e.g. scala.concurrent.ExecutionContext.Implicits.global (works 
for me):

Future {
  // this will be on background
}

You can use that to trigger event propagation on background. Every FRP 
library is probably going to manage threads in its own way. I haven’t used 
RxJava (IMHO it’s way too verbose), but Scala.Rx and Scala.frp 
(https://github.com/dylemma/scala.frp) AFAIK both just use the calling 
thread, so the above applies. RxJava probably uses its own thread pool.

What Macroid provides in this regard is that when you connect reactive 
variables/streams to widgets, it ensures that changes to widgets are 
applied on the UI thread.

Hope that helps,
Nick

-- 
You received this message because you are subscribed to the Google Groups 
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to