Show More
@@ -64,11 +64,10 b' def _numworkers(ui):' | |||||
64 | return min(max(countcpus(), 4), 32) |
|
64 | return min(max(countcpus(), 4), 32) | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | if pycompat.ispy3: |
|
|||
68 |
|
||||
69 |
|
|
67 | def ismainthread(): | |
70 |
|
|
68 | return threading.current_thread() == threading.main_thread() | |
71 |
|
69 | |||
|
70 | ||||
72 |
|
|
71 | class _blockingreader(object): | |
73 |
|
|
72 | def __init__(self, wrapped): | |
74 |
|
|
73 | self._wrapped = wrapped | |
@@ -100,17 +99,6 b' if pycompat.ispy3:' | |||||
100 |
|
|
99 | return bytes(buf) | |
101 |
|
100 | |||
102 |
|
101 | |||
103 | else: |
|
|||
104 |
|
||||
105 | def ismainthread(): |
|
|||
106 | # pytype: disable=module-attr |
|
|||
107 | return isinstance(threading.current_thread(), threading._MainThread) |
|
|||
108 | # pytype: enable=module-attr |
|
|||
109 |
|
||||
110 | def _blockingreader(wrapped): |
|
|||
111 | return wrapped |
|
|||
112 |
|
||||
113 |
|
||||
114 | if pycompat.isposix or pycompat.iswindows: |
|
102 | if pycompat.isposix or pycompat.iswindows: | |
115 | _STARTUP_COST = 0.01 |
|
103 | _STARTUP_COST = 0.01 | |
116 | # The Windows worker is thread based. If tasks are CPU bound, threads |
|
104 | # The Windows worker is thread based. If tasks are CPU bound, threads |
General Comments 0
You need to be logged in to leave comments.
Login now