Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created May 18, 2015 22:50
Show Gist options
  • Select an option

  • Save Sciss/c46a5a36e7e731d3555b to your computer and use it in GitHub Desktop.

Select an option

Save Sciss/c46a5a36e7e731d3555b to your computer and use it in GitHub Desktop.
val f = userHome/"Documents"/"jack"/"fifo.log"
val fin = new java.io.BufferedReader(new java.io.FileReader(f))
new Thread {
override def run(): Unit = {
var ln = null: String
do {
ln = fin.readLine()
if (ln != null) println(s"LINE: $ln")
} while (ln != null)
println("CLOSE")
}
start()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment