Define thread-safe.

Are you asking if it's possible to decode two bitmaps at the same
time? To decode a stream while something else is using the stream? To
do it in a worker thread?

My take is that it's re-entrant, i.e. you can run it multiple times at
the same time in separate threads, but all the objects it uses (the
stream, the bitmap) should not be touched by any other thread while
the decoding is in progress.

If you do run multiple stream decoders at the same time, keep in mind
that it can be prohibitively expensive if you are working with big
bitmaps.

-Mike



On May 7, 4:26 am, Agus <[email protected]> wrote:
> Is the BitmapFactory.decodeStream method thread safe?
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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