多的Andr​​oid IntentServices可以在同一时间运行? [英] Can multiple Android IntentServices run at the same time?

查看:211
本文介绍了多的Andr​​oid IntentServices可以在同一时间运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,一个 IntentService 只能处理一个意图在一时间成为这股工作线程来完成所​​有的工作。但是,如果我在我的应用程序有多个 IntentService S,它们可以并行运行,还是他们都有着一个工作线程呢?


解决方案

  

但是,如果我有多个IntentServices在我的应用程序,它们可以并行运行


如果你的意思是你有 IntentService 的多个子类,他们应该能够并行运行。

From what I understand, an IntentService can only handle one Intent at a time as it shares a worker thread to do all of its work. But if I have multiple IntentServices in my app, can they run in parallel, or do they all share the single worker thread as well?

解决方案

But if I have multiple IntentServices in my app, can they run in parallel

If you mean that you have multiple subclasses of IntentService, they should be able to run in parallel.

这篇关于多的Andr​​oid IntentServices可以在同一时间运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆