示例#1
0
文件: __init__.py 项目: zimingzpp/rc
def StopServer( ycm ):
  try:
    ycm.OnVimLeave()
    WaitUntilProcessIsTerminated( ycm._server_popen )
    CloseStandardStreams( ycm._server_popen )
  except Exception:
    pass
示例#2
0
 def Wrapper(*args, **kwargs):
     ycm = YouCompleteMe(_MakeUserOptions(custom_options))
     _WaitUntilReady()
     try:
         test(ycm, *args, **kwargs)
     finally:
         ycm.OnVimLeave()
         WaitUntilProcessIsTerminated(ycm._server_popen)
示例#3
0
def MockProcessTerminationTimingOut( handle, timeout = 5 ):
  WaitUntilProcessIsTerminated( handle, timeout )
  raise RuntimeError( f'Waited process to terminate for { timeout } seconds, '
                      'aborting.' )