comparison mercurial/worker.py @ 50996:d0b8bbf603d7

openvms: consider worker costly on OpenVMS As for Windows, the parallel worker feature is less appealing on OpenVMS.
author Jean-Francois Pieronne <jf.pieronne@laposte.net>
date Thu, 03 Aug 2023 02:30:57 +0200
parents 3eef8baf6b92
children f4733654f144 49aeeda97c14
comparison
equal deleted inserted replaced
50995:ce9cb12ca8c9 50996:d0b8bbf603d7
59 59
60 def ismainthread(): 60 def ismainthread():
61 return threading.current_thread() == threading.main_thread() 61 return threading.current_thread() == threading.main_thread()
62 62
63 63
64 if pycompat.isposix or pycompat.iswindows: 64 if (
65 pycompat.isposix and pycompat.sysplatform != b'OpenVMS'
66 ) or pycompat.iswindows:
65 _STARTUP_COST = 0.01 67 _STARTUP_COST = 0.01
66 # The Windows worker is thread based. If tasks are CPU bound, threads 68 # The Windows worker is thread based. If tasks are CPU bound, threads
67 # in the presence of the GIL result in excessive context switching and 69 # in the presence of the GIL result in excessive context switching and
68 # this overhead can slow down execution. 70 # this overhead can slow down execution.
69 _DISALLOW_THREAD_UNSAFE = pycompat.iswindows 71 _DISALLOW_THREAD_UNSAFE = pycompat.iswindows