Can two different intentservices run concurrently? Does OS wait for first intentservice to stop before starting second intent service?

StackOverflow https://stackoverflow.com/questions/22749017

سؤال

I have two intentservices: IntentServiceA and IntentServiceB.

While IntentServiceA is running and if I call startService(IntentServiceB) , will IntentServiceB run concurrently with IntentServiceA or does it wait till IntentServiceA stops?

If it was about Asynctasks it would be: AsyncktaskB won't start till AsynctaskA is finished. But I could not find any documentation for this scenario in case of IntentService.

هل كانت مفيدة؟

المحلول

A quick look at the IntentService source code indicates that each IntentService should have its own HandlerThread and therefore should run concurrently. That being said, I do not recall ever trying this.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top