Browse Source

Make parallelism opt-in instead of opt-out for now (#12252)

Oh well
Rudy Ges 2 months ago
parent
commit
f7302671b8
3 changed files with 5 additions and 5 deletions
  1. 3 3
      src-json/define.json
  2. 1 1
      src/compiler/compiler.ml
  3. 1 1
      src/context/parallel.ml

+ 3 - 3
src-json/define.json

@@ -83,10 +83,10 @@
 		"doc": "Disable shortcuts used by hxb cache to speed up display requests."
 	},
 	{
-		"name": "DisableParallelism",
-		"define": "disable-parallelism",
+		"name": "EnableParallelism",
+		"define": "enable-parallelism",
 		"signatureNeutral": true,
-		"doc": "Disable all uses of parallelism in the compiler."
+		"doc": "Enable experimental uses of parallelism in the compiler."
 	},
 	{
 		"name": "DisableUnicodeStrings",

+ 1 - 1
src/compiler/compiler.ml

@@ -270,7 +270,7 @@ module Setup = struct
 end
 
 let check_defines com =
-	if defined com Define.DisableParallelism then Parallel.enable := false;
+	if defined com Define.EnableParallelism then Parallel.enable := true;
 	PMap.iter (fun k v ->
 		try
 			let reason = Hashtbl.find Define.deprecation_lut k in

+ 1 - 1
src/context/parallel.ml

@@ -1,4 +1,4 @@
-let enable = ref true
+let enable = ref false
 
 let run_parallel_for num_domains ?(chunk_size=0) length f =
 	if not !enable then begin