Make PackFile thread-safe
commit7e48870003cb77cabac074b6e0d61aeb50ac92c4
authorShawn O. Pearce <spearce@spearce.org>
Tue, 23 Dec 2008 00:27:15 +0000 (22 16:27 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sun, 4 Jan 2009 00:01:48 +0000 (4 01:01 +0100)
tree445cac430998cd24a6907ee88a8c393e7a3317e7
parentb73568096310020013ffc713a0c6b3718d25225c
Make PackFile thread-safe

We really should try to avoid allocating the reverse index within
the pack object itself, and instead make the applications that do
use this data manage it themselves.  This way the index could be
released in memory when its no longer used, and the locking could
be bypassed entirely.

Since most of PackFile is dependent upon the WindowedFile we can
mostly ignore synchronization in this class.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/lib/PackFile.java