Results 1 to 2 of 2
- 09-14-2009, 10:01 PM #1Member
- Join Date
- Sep 2009
- Gouda, the Netherlands
- Rep Power
RCU in Java? or some list/set/etc. which can handle concurrent access?
Does Java have some kind of RCU (read-copy-update) mechanism for sets/lists?
What I would like to do is: I have a list of objects that multiple threads can work on. When they're finished, they should remove the object from the list (or the master thread should do it, doesn't matter for now). But also they should fetch a new work-object from that array as well as add new ones.
An option could be add a single lock to the whole list for all read/write access but it is possible that the processingtime of a batch of work-objects is that short that lock-contention would happen constantly. And with enough processors (and thus threads) this lock contention is bound to happen.
So, anyone got a suggestion how to solve this?
- 09-14-2009, 10:59 PM #2
or use a java.util.concurrent list of your choice. :)My Hobby Project: LegacyClone
- By sunny_sykes in forum Advanced JavaReplies: 1Last Post: 03-30-2009, 08:29 AM
- By bharat_kasodariya in forum Advanced JavaReplies: 1Last Post: 02-26-2009, 03:06 PM
- By fxRichard in forum Advanced JavaReplies: 5Last Post: 01-02-2009, 09:08 PM
- By alvations in forum New To JavaReplies: 5Last Post: 10-08-2008, 12:23 PM
- By Albert in forum Advanced JavaReplies: 1Last Post: 06-07-2007, 05:29 AM