]> source.dussan.org Git - gitblit.git/commit
Issue #1076: load commit cache in a background thread 1140/head
authorTom <tw201207@gmail.com>
Wed, 26 Oct 2016 19:37:19 +0000 (21:37 +0200)
committerTom <tw201207@gmail.com>
Thu, 27 Oct 2016 14:07:26 +0000 (16:07 +0200)
commitde3f435db5256bd5a106462dcfc0a2ccdce95450
treec3263399e3ebd8023fdcf088379d608cefe86706
parenta3665a6a8218cb19eef6bbddcbbc317258f616f1
Issue #1076: load commit cache in a background thread

* Make the CommitCache fully thread-safe. It was using a
  ConcurrentHashMap containing lists, but then handed out these lists.
  It also did multiple operations on that map that as a whole should
  be atomic.

* Use isEmpty() instead of size() == 0.

* Run the loading of the commit cache in a background daemon thread
src/main/java/com/gitblit/manager/RepositoryManager.java
src/main/java/com/gitblit/utils/ArrayUtils.java
src/main/java/com/gitblit/utils/CommitCache.java