From: Soonil Nagarkar <soon...@gmail.com>
Date: Mon, 13 Oct 2008 15:35:53 -0700 (PDT)
Local: Mon, Oct 13 2008 6:35 pm
Subject: Sticky Broadcasts and Concurrency
I have a component that uses sticky broadcasts to send out state
information about itself along the lines of enabled/disabled. By using sticky broadcasts, anybody that needs to check the state of the component (which can be changed at any time by other threads) can stay up to date rather than using a polling mechanism which doesn't guarantee any 'up-to-date-ness'. However, my understanding of the sticky broadcast documentation is
Ex 1.
if(last_broadcast != null)
//it is possible for a thread to interleave its own call to
last_broadcast = new Intent(...);
Ex 2.
Intent new_broadcast = new Intent(...);
//it is possible for a thread to interleave its own call to
if(last_broadcast != null)
Neither of these two scenarios solves the problem entirely, and I
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||