R
R
Rarity72019-08-25 10:43:20
Android
Rarity7, 2019-08-25 10:43:20

Async, multithreading in android?

I read an article on Habré about asynchrony and multithreading. I can’t understand, in Android, the interface is updated in the Main Thread, that is, is it a thread?
Tasks of type request to a network or saving in a DB should be fulfilled in other flow? How about asynchrony? Well, it's not the same thing, is it? For example RxJava, it executes the request in another thread and asynchronously?? Here I can not understand what is the difference?
I can’t understand if there is a difference, for example, making a network request, using Retrofit and RxJava, and just Thread.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2019-08-25
@rPman

Yes, android (this is linux + java or whatever) is a multi-threaded operating system (and it runs on hardware with several cores in the processor, for a long time), and yes, no one bothers you how to use it or not.
Asynchrony does not imply the use of threads, for example, you can use asynchronous sockets within the same thread.
Here in the comments to the question a little chewed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question