Glazed Lists provides a convenience class in order to avoid wrapping all of your
read operations with this try/finally block called ThreadSafeList
Simply wrap your list of interest in a ThreadSafeList
and perform
your method calls on that class. Unfortunately, ThreadSafeList
has some disadvantages:
It may be slower because it must perform a lock()
and
unlock
for each method call because manual locking allows
a block of operations to share a lock.
It is possible that the source list will change between two adjacent
ThreadSafeList
calls.