added Isabelle_Process.input_bytes, which avoids the somewhat slow Standard_System.string_bytes (just in case someone wants to stream raw data at 250MB/s);
authorwenzelm
Fri Aug 13 21:33:13 2010 +0200 (2010-08-13 ago)
changeset 38372e753f71b6b34
parent 38371 5b615a4a3a68
child 38373 e8197eea3cd0
added Isabelle_Process.input_bytes, which avoids the somewhat slow Standard_System.string_bytes (just in case someone wants to stream raw data at 250MB/s);
src/Pure/System/isabelle_process.scala
     1.1 --- a/src/Pure/System/isabelle_process.scala	Fri Aug 13 21:30:10 2010 +0200
     1.2 +++ b/src/Pure/System/isabelle_process.scala	Fri Aug 13 21:33:13 2010 +0200
     1.3 @@ -373,8 +373,11 @@
     1.4  
     1.5    def input_raw(text: String): Unit = standard_input ! Input_Text(text)
     1.6  
     1.7 +  def input_bytes(name: String, args: Array[Byte]*): Unit =
     1.8 +    command_input ! Input_Chunks(Standard_System.string_bytes(name) :: args.toList)
     1.9 +
    1.10    def input(name: String, args: String*): Unit =
    1.11 -    command_input ! Input_Chunks((name :: args.toList).map(Standard_System.string_bytes))
    1.12 +    input_bytes(name, args.map(Standard_System.string_bytes): _*)
    1.13  
    1.14    def close(): Unit = command_input ! Close
    1.15  }