IntentServices是否可能被无序调用?

时间:2019-01-10 12:35:35

标签: android android-service android-intentservice

我在同一线程上有两次对 startService 的调用,但是显然这些调用是在我的 IntentService 中乱序接收的。

我们的客户说,该功能只能在某些设备上使用,而不能在其他设备上使用,因此我猜测可能是这种情况。

我知道 IntentService 具有 FIFO 方式来执行Intent。因此,一旦意图到达,订单就得到保证。我的问题是,一个 startService 可能被延迟,而另一个优先。有谁知道 startService 在内部如何工作?

代码或多或少像这样

(... some logic...)

callService(param1)

(... more logic...)

callService(param2)

0 个答案:

没有答案