|
Re: Fixed size CopyOnWriteArrayList vs array concurrent access.: msg#00078java.jsr.166-concurrency
COWAL is most appropriate when writes are infrequent. I think the simplest approach in your case is an array of thread-safe value-holders. You could use SynchronizedRef from Doug Lea's util.concurrent package, or AtomicReference from Dawid Kurzyniec's backport. Or just roll your own. Note that this only deals with concurrent access of the elements as opaque values. It does not address the issue of whether the element values themselves refer to thread-safe objects; if they do not, then two threads might safely obtain the value of the first element in the array only to unsafely call methods of the object referred to by that value. --tim On 10/31/06, Eugene Gordienko <
egordienko@xxxxxxxxx> wrote:
_______________________________________________ Concurrency-interest mailing list Concurrency-interest@xxxxxxxxxxxxxxxxxxxx http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Fixed size CopyOnWriteArrayList vs array concurrent access., Eugene Gordienko |
|---|---|
| Next by Date: | Re: Fixed size CopyOnWriteArrayList vs array concurrent access., Brian Goetz |
| Previous by Thread: | Fixed size CopyOnWriteArrayList vs array concurrent access., Eugene Gordienko |
| Next by Thread: | Re: Fixed size CopyOnWriteArrayList vs array concurrent access., Brian Goetz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |