Похожие чаты

If i post 2 long network operations to a handler,

will they start executing parallely, or one after the other?

1 ответов

5 просмотров

One after the other. A Handler itself uses a single thread. That depends on which Looper you instantiate it with. You're probably using the main Looper in your app, and so it'll use the main thread. If you want parallel, use https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newFixedThreadPool(int)

Похожие вопросы

Карта сайта