Show More
@@ -1109,6 +1109,17 b' class dirstate(object):' | |||
|
1109 | 1109 | use_rust = False |
|
1110 | 1110 | |
|
1111 | 1111 | if use_rust: |
|
1112 | # Force Rayon (Rust parallelism library) to respect the number of | |
|
1113 | # workers. This is a temporary workaround until Rust code knows | |
|
1114 | # how to read the config file. | |
|
1115 | numcpus = self._ui.configint("worker", "numcpus") | |
|
1116 | if numcpus is not None: | |
|
1117 | encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus) | |
|
1118 | ||
|
1119 | workers_enabled = self._ui.configbool("worker", "enabled", True) | |
|
1120 | if not workers_enabled: | |
|
1121 | encoding.environ[b"RAYON_NUM_THREADS"] = b"1" | |
|
1122 | ||
|
1112 | 1123 | ( |
|
1113 | 1124 | lookup, |
|
1114 | 1125 | modified, |
General Comments 0
You need to be logged in to leave comments.
Login now