Skip to content

Commit

Permalink
Fix compilation under -Ycheck-reentrant
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed May 7, 2024
1 parent a2e4cbd commit cc05d6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/src/dotty/tools/dotc/profile/FileUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import java.util.concurrent.atomic.AtomicBoolean
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Promise}
import scala.util.{Failure, Success}
import scala.annotation.internal.sharable

object FileUtils {
def newAsyncBufferedWriter(path: Path, charset: Charset = StandardCharsets.UTF_8.nn, options: Array[OpenOption] = NO_OPTIONS, threadsafe: Boolean = false): LineWriter = {
Expand Down Expand Up @@ -72,8 +73,8 @@ object FileUtils {
}

private object AsyncBufferedWriter {
private val Close = CharBuffer.allocate(0)
private val Flush = CharBuffer.allocate(0)
@sharable private val Close = CharBuffer.allocate(0)
@sharable private val Flush = CharBuffer.allocate(0)
}
private class AsyncBufferedWriter(val underlying: Writer, bufferSize : Int = 4096) extends LineWriter {
private var current: CharBuffer = allocate
Expand Down

0 comments on commit cc05d6a

Please sign in to comment.