future proofs: Future.fork_pri 1 minimizes queue length and pending promises
-- slight improvement of throughput, at the cost of a bit of parallelism;
--- a/src/Pure/Isar/toplevel.ML Tue Dec 16 16:25:20 2008 +0100
+++ b/src/Pure/Isar/toplevel.ML Tue Dec 16 18:04:16 2008 +0100
@@ -718,7 +718,7 @@
val future_proof = Proof.future_proof
(fn prf =>
- Future.fork_pri ~1 (fn () =>
+ Future.fork_pri 1 (fn () =>
let val (states, State (result_node, _)) =
(case st' of State (SOME (Proof (_, (_, orig_gthy)), exit), prev)
=> State (SOME (Proof (ProofNode.init prf, (finish, orig_gthy)), exit), prev))
--- a/src/Pure/goal.ML Tue Dec 16 16:25:20 2008 +0100
+++ b/src/Pure/goal.ML Tue Dec 16 18:04:16 2008 +0100
@@ -179,7 +179,7 @@
val res =
if immediate orelse #maxidx (Thm.rep_cterm stmt) >= 0 orelse not (Future.enabled ())
then result ()
- else future_result ctxt' (Future.fork_pri ~1 result) (Thm.term_of stmt);
+ else future_result ctxt' (Future.fork_pri 1 result) (Thm.term_of stmt);
in
Conjunction.elim_balanced (length props) res
|> map (Assumption.export false ctxt' ctxt)