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