Sorry, i should have given process info.
Both of my services run in independent applications and they are in
different process to reduce point of failures (like abnormal process
termination, low memory kills etc).

   This use case is when Service A (process A) is destroyed, it stops
Service B (process B) and waits for an ack back in its onDestroy().

On Aug 17, 2:17 pm, Mark Murphy <[email protected]> wrote:
> On Fri, Aug 17, 2012 at 4:55 PM, Ubuntu guy <[email protected]> wrote:
> > well, i meant waiting on a coundownlatch which is released by the
> > broadcast receiver which receives the intent sent from the other
> > service's onDestroy.
>
> > Besides, this happens within 2 seconds.
>
> If I understand you correctly:
>
> - You are blocking the main application thread by blocking on a
> CountDownLatch in a service's onDestroy()
>
> - You think that another service's onDestroy() is going to run, to be
> able to send a broadcast, but it cannot run, since you are blocking
> the main application thread by blocking on a CountDownLatch in the
> first service's onDestroy()
>
> If these services are so inter-dependent, why are they two separate
> services in the first place?
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 4.0 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to