Skip to content

Commit

Permalink
Debug with prints...
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Nov 23, 2023
1 parent cbbb48e commit 8426b42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bridge/src/main/scala/protocbridge/FileCache.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ final class FileCache[K](
def get(key: K): Future[File] = {
val f = fileForKey(key)
val cm = completeMarker(key)
println(s"*** key=$key: ${cm.getAbsolutePath()}=${cm.exists()} and ${f.getAbsolutePath()}=${f.exists()}")
if (cm.exists() && f.exists()) {
f.setExecutable(true)
Future.successful(f)
} else {
val p = Promise[File]()
val prev = tasks.putIfAbsent(key, p)
println(s"*** key=$key prev=$prev")
if (prev == null) {
// we are the first
val tmpDir = Files.createTempDirectory("protocbridge").toFile
Expand Down

0 comments on commit 8426b42

Please sign in to comment.