aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/git/log
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-10-05 08:29:44 +0530
committerGitHub <noreply@github.com>2020-10-05 08:29:44 +0530
commit3ddd06679f1e666716391450adaa687db33332c7 (patch)
tree23c766dda568b513b3940200c9f7bcbc214591fa /app/src/main/java/com/zeapo/pwdstore/git/log
parent8a4316067396e6a0a5490e727197cf843d3f4ec6 (diff)
downloadHardenedPass-3ddd06679f1e666716391450adaa687db33332c7.tar.gz
HardenedPass-3ddd06679f1e666716391450adaa687db33332c7.zip
Resolve lock contention from lazy delegates (#1135)
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/git/log')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/log/GitLogModel.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/log/GitLogModel.kt b/app/src/main/java/com/zeapo/pwdstore/git/log/GitLogModel.kt
index ccd2f88a..15b9f64d 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/log/GitLogModel.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/log/GitLogModel.kt
@@ -41,7 +41,7 @@ class GitLogModel {
// This is because the commit graph is walked from HEAD to the last commit to obtain.
// Additionally, tests with 1000 commits in the log have not produced a significant delay in the
// user experience.
- private val cache: MutableList<GitCommit> by lazy {
+ private val cache: MutableList<GitCommit> by lazy(LazyThreadSafetyMode.NONE) {
commits().map {
GitCommit(it.hash, it.shortMessage, it.authorIdent.name, it.time)
}.toMutableList()