equal
deleted
inserted
replaced
196 fun init rendezvous = ignore (Simple_Thread.fork false (fn () => |
196 fun init rendezvous = ignore (Simple_Thread.fork false (fn () => |
197 let |
197 let |
198 val _ = OS.Process.sleep (seconds 0.5); (*yield to raw ML toplevel*) |
198 val _ = OS.Process.sleep (seconds 0.5); (*yield to raw ML toplevel*) |
199 val _ = Output.physical_stderr Symbol.STX; |
199 val _ = Output.physical_stderr Symbol.STX; |
200 |
200 |
201 (* FIXME proper system options *) |
|
202 val _ = Printer.show_markup_default := true; |
201 val _ = Printer.show_markup_default := true; |
203 val _ = quick_and_dirty := false; |
202 val _ = quick_and_dirty := false; |
204 val _ = Goal.parallel_proofs := 4; |
|
205 val _ = |
|
206 if Multithreading.max_threads_value () < 2 |
|
207 then Multithreading.max_threads := 2 else (); |
|
208 val _ = Context.set_thread_data NONE; |
203 val _ = Context.set_thread_data NONE; |
209 val _ = |
204 val _ = |
210 Unsynchronized.change print_mode |
205 Unsynchronized.change print_mode |
211 (fn mode => (mode @ default_modes1) |> fold (update op =) default_modes2); |
206 (fn mode => (mode @ default_modes1) |> fold (update op =) default_modes2); |
212 |
207 |
215 in loop channel end)); |
210 in loop channel end)); |
216 |
211 |
217 fun init_fifos fifo1 fifo2 = init (fn () => System_Channel.fifo_rendezvous fifo1 fifo2); |
212 fun init_fifos fifo1 fifo2 = init (fn () => System_Channel.fifo_rendezvous fifo1 fifo2); |
218 fun init_socket name = init (fn () => System_Channel.socket_rendezvous name); |
213 fun init_socket name = init (fn () => System_Channel.socket_rendezvous name); |
219 |
214 |
220 end; |
215 |
221 |
216 (* options *) |
|
217 |
|
218 val _ = |
|
219 protocol_command "Isabelle_Process.options" |
|
220 (fn [options_yxml] => |
|
221 let val options = Options.decode (YXML.parse_body options_yxml) in |
|
222 Multithreading.trace := Options.int options "threads_trace"; |
|
223 Multithreading.max_threads := Options.int options "threads"; |
|
224 if Multithreading.max_threads_value () < 2 |
|
225 then Multithreading.max_threads := 2 else (); |
|
226 Goal.parallel_proofs := (if Options.int options "parallel_proofs" > 0 then 4 else 0); |
|
227 Goal.parallel_proofs_threshold := Options.int options "parallel_proofs_threshold" |
|
228 end); |
|
229 |
|
230 end; |
|
231 |