Tuesday, August 9, 2011

[android-developers] Re: View.post* methods are not thread-safe

Thanks for the info, Romain.

Fixed in 3.0? Do you know in which platform version this bug first
appeared? My searches didn't locate a previous bug report -- but my
apps did :-(

I'll revise my message: The View.post* methods are meant to be thread-
safe, but they aren't prior to 3.0

Joe

On Aug 9, 5:00 pm, joebowbeer <joe.bowb...@gmail.com> wrote:
> Correction: As the title indicates, I meant to write "View.post*"
> methods...
>
> On Aug 9, 4:48 pm, joebowbeer <joe.bowb...@gmail.com> wrote:
>
>
> > I filed a bug regarding inconsistent documentation of the Thread.post*
> > methods:
>
> >http://code.google.com/p/android/issues/detail?id=19143
>
> > I'm fine with always using a Handler, as the View documentation
> > stipulates, but the rest of the View documentation is scattered with
> > error-prone advise to call the post* methods from non-UI threads --
> > which has led to NPEs in my own experience.
>
> > So I wanted to post this to the list as well as file a bug.

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment