mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Better synchronization for the incremental manager.
This commit is contained in:
parent
1969252d16
commit
75797c33c3
1 changed files with 9 additions and 3 deletions
|
@ -72,17 +72,23 @@ class IncrementalManager @Inject constructor(val args: Args, @Assisted val fileN
|
||||||
}
|
}
|
||||||
|
|
||||||
fun inputChecksumFor(taskName: String) : String? =
|
fun inputChecksumFor(taskName: String) : String? =
|
||||||
|
synchronized(BUILD_INFO_FILE) {
|
||||||
taskInfoFor(taskInfos(), taskName).inputChecksum
|
taskInfoFor(taskInfos(), taskName).inputChecksum
|
||||||
|
}
|
||||||
|
|
||||||
fun saveOutputChecksum(taskName: String, outputChecksum: String) {
|
fun saveOutputChecksum(taskName: String, outputChecksum: String) {
|
||||||
with(taskInfos()) {
|
synchronized(BUILD_INFO_FILE) {
|
||||||
taskInfoFor(this, taskName).outputChecksum = outputChecksum
|
with(taskInfos()) {
|
||||||
save(this)
|
taskInfoFor(this, taskName).outputChecksum = outputChecksum
|
||||||
|
save(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun outputChecksumFor(taskName: String) : String? =
|
fun outputChecksumFor(taskName: String) : String? =
|
||||||
|
synchronized(BUILD_INFO_FILE) {
|
||||||
taskInfoFor(taskInfos(), taskName).outputChecksum
|
taskInfoFor(taskInfos(), taskName).outputChecksum
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param method is assumed to return an IncrementalTaskInfo.
|
* @param method is assumed to return an IncrementalTaskInfo.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue