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 f043798 commit f8c0a91
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit f8c0a91

Please sign in to comment.