equal
deleted
inserted
replaced
1117 |
1117 |
1118 if use_rust: |
1118 if use_rust: |
1119 # Force Rayon (Rust parallelism library) to respect the number of |
1119 # Force Rayon (Rust parallelism library) to respect the number of |
1120 # workers. This is a temporary workaround until Rust code knows |
1120 # workers. This is a temporary workaround until Rust code knows |
1121 # how to read the config file. |
1121 # how to read the config file. |
1122 numcpus = self._ui.configint("worker", "numcpus") |
1122 numcpus = self._ui.configint(b"worker", b"numcpus") |
1123 if numcpus is not None: |
1123 if numcpus is not None: |
1124 encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus) |
1124 encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus) |
1125 |
1125 |
1126 workers_enabled = self._ui.configbool("worker", "enabled", True) |
1126 workers_enabled = self._ui.configbool(b"worker", b"enabled", True) |
1127 if not workers_enabled: |
1127 if not workers_enabled: |
1128 encoding.environ[b"RAYON_NUM_THREADS"] = b"1" |
1128 encoding.environ[b"RAYON_NUM_THREADS"] = b"1" |
1129 |
1129 |
1130 ( |
1130 ( |
1131 lookup, |
1131 lookup, |