This question is in regard to android.support.v4.util.CircularArray.
I'm looking at using a CircularArray
to feed data from one thread to another. Each element is an array of type short[]
.
- Can the Array be safely added to and popped from, concurrently?
- Can I be sure that when I try to pop an element, that it has been atomically added to the array?
- Can I safely clear the Array from a particular thread?
The documentation for CircularArray
doesn't say anything about thread-safety, but I'm wondering if there are general assumptions specified elsewhere in the SDK documentation that apply to it.