I’m looking at porting some code that uses java.util.concurrent.ConcurrentSkipListSet to an environment where this class is not available (specifically, android 2.2). I’m therefore looking for alternatives to it. My requirements are:
- basic ‘Set’ implementation (don’t need NavigableSet or similar)
- standard operations must be thread safe (I don’t have a high call volume, so locking is acceptable)
- iterators must not throw ConcurrentModificationException
- iterators must support the remove() operation
Any ideas?
There is a backport of java.util.concurrent for JDK 1.3 and above. It includes ConcurrentSkipListSet. Give that a try. You probably want the version for JDK 5.