On Mon, Jul 5, 2010 at 8:27 PM, tarek attia <tarek.m.at...@gmail.com> wrote:
> Just I created an activity that start a new service collect some data,the
> this service will intiate another thread to do certain operations on the
> data collected by the service.....so all I feared that may the service
> access this array and the thread also at the same time and a race condition
> might happen ?
> So am I thinking right or wrong ?

You need to synchronize access to anything shared between threads that
is not intrinsically thread-safe.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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

Reply via email to