Skip to content

Commit

Permalink
Write header before starting scribe
Browse files Browse the repository at this point in the history
  • Loading branch information
Friendseeker committed Oct 15, 2024
1 parent 9089fcd commit 048b779
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ object ParallelGzipOutputStream {
}

override def run(): Unit = {
out.write(header)
loop()
}
}
Expand Down Expand Up @@ -128,6 +127,8 @@ final class ParallelGzipOutputStream(out: OutputStream, parallelism: Int)
private val workerCount = math.max(1, parallelism - 1)
private val workers = new ArrayBlockingQueue[Worker](workerCount)
private val buffers = new LinkedTransferQueue[Block]()

out.write(header)
private val scribe = new Scribe(out, buffers)
scribe.start()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package sbt.inc.consistent

import org.scalatest.funsuite.AnyFunSuite
import sbt.internal.inc.consistent.*
import sbt.internal.inc.consistent.Compat.*
import sbt.io.IO

import java.io.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ParallelGzipOutputStreamSpecification extends AnyFlatSpec with Matchers {
def sanitizedFilename(fileName: String): String = {
fileName.replaceAll("[^a-zA-Z0-9-_.]", "_")
}

def handleFailure(
compressed: Array[Byte],
data: Array[Byte],
Expand Down

0 comments on commit 048b779

Please sign in to comment.