Created
May 18, 2015 22:50
-
-
Save Sciss/c46a5a36e7e731d3555b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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