Reputation: 2694
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[]
.
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.
Upvotes: 1
Views: 510
Reputation: 612
If not explicitly stated, the classes of the Android platform are not thread-safe. So the answer to your questions is no.
You better use a queue from the java.util.concurrent package to implement your inter-thread communication.
Upvotes: 1