Tuesday, August 9, 2011

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

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