]> git.proxmox.com Git - libgit2.git/commit
Further threading fixes
authorRussell Belfer <rb@github.com>
Mon, 15 Apr 2013 07:09:03 +0000 (00:09 -0700)
committerVicent Marti <tanoku@gmail.com>
Mon, 22 Apr 2013 14:52:07 +0000 (16:52 +0200)
commit536078688549ac3d50483eecdec5a8169d921927
tree3ceb9965aba3f946b89bbbd99a8071707351d50f
parent116bbdf0446cd5335b73e691c3352f368eac9b8f
Further threading fixes

This builds on the earlier thread safety work to make it so that
setting the odb, index, refdb, or config for a repository is done
in a threadsafe manner with minimized locking time.  This is done
by adding a lock to the repository object and using it to guard
the assignment of the above listed pointers.  The lock is only
held to assign the pointer value.

This also contains some minor fixes to the other work with pack
files to reduce the time that locks are being held to and fix an
apparently memory leak.
src/global.c
src/mwindow.c
src/pack.c
src/pack.h
src/refdb_fs.c
src/repository.c
src/repository.h
src/util.h