简体   繁体   中英

What is difference between Worker thread vs Background thread android?

任何人都可以简单地解释我们在哪里使用工作线程和后台线程以及一些实时示例。

这很简单:在Android“背景”和“工作者”线程是相同的。

Background thread as name states runs separate from main thread and does not hang the main thread so its a async operation and a Worker thread is runs parallel to main thread. In short we can run worker thread and background thread at the same time together.

Background threads are dead once the application exists whereas worker threads complete the action even if the application closed.

They are synonyms. You can check the android Worker threads reference where they remark that:

Because of the single threaded model described above, it's vital to the responsiveness of your application's UI that you do not block the UI thread. If you have operations to perform that are not instantaneous, you should make sure to do them in separate threads ( "background" or "worker" threads ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM