##// END OF EJS Templates
rust-threads: force Rayon to respect the worker count in config...
Raphaël Gomès -
r44316:37cbf45b stable
parent child Browse files
Show More
@@ -1116,6 +1116,17 b' class dirstate(object):'
1116 use_rust = False
1116 use_rust = False
1117
1117
1118 if use_rust:
1118 if use_rust:
1119 # Force Rayon (Rust parallelism library) to respect the number of
1120 # workers. This is a temporary workaround until Rust code knows
1121 # how to read the config file.
1122 numcpus = self._ui.configint("worker", "numcpus")
1123 if numcpus is not None:
1124 encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus)
1125
1126 workers_enabled = self._ui.configbool("worker", "enabled", True)
1127 if not workers_enabled:
1128 encoding.environ[b"RAYON_NUM_THREADS"] = b"1"
1129
1119 (
1130 (
1120 lookup,
1131 lookup,
1121 modified,
1132 modified,
General Comments 0
You need to be logged in to leave comments. Login now