Suppose i have two classes that inherit from IntentService. Now quoting from the documentation
All requests are handled on a single worker thread -- they may take as long as necessary (and will not block the application's main loop), but only one request will be processed at a time.
Now suppose my classes are called SericeA extends IntentService, and ServiceB extends IntentServicenow when i call startService for an object of type ServiceA and startService for an Object of type ServiceB, will these both be handled by the same worker thread. Is there a System wide worker thread, or just a worker thread associated with a particular IntentService.
Kind Reagrds
will these both be handled by the same worker thread
No.
or just a worker thread associated with a particular IntentService.
Yes.
You can tell this by looking at the source code to IntentService and noticing that each IntentService creates its own HandlerThread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With