File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
rplugin/python3/ultest/vim_client/jobs Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ def __init__(self, num_threads: int = 2):
18
18
self ._jobs : defaultdict [str , Dict [str , Event ]] = defaultdict (dict )
19
19
self ._loop = asyncio .new_event_loop ()
20
20
self ._thread = Thread (target = self ._loop .run_forever , daemon = True )
21
- self ._sem = Semaphore (num_threads , loop = self ._loop )
22
21
self ._thread .start ()
23
22
if sys .version_info < (3 , 8 ):
24
23
# Use the new default watcher from >= 3.8, implemented locally
@@ -27,6 +26,9 @@ def __init__(self, num_threads: int = 2):
27
26
28
27
logger .info ("Using local threaded child watcher" )
29
28
asyncio .set_child_watcher (ThreadedChildWatcher ())
29
+ self ._sem = Semaphore (num_threads , loop = self ._loop )
30
+ else :
31
+ self ._sem = Semaphore (num_threads )
30
32
31
33
@property
32
34
def semaphore (self ) -> Semaphore :
You can’t perform that action at this time.
0 commit comments