python多处理程序挂在生产模式上

问题描述

我正在使用pygls和Python开发LSP服务器,该服务器从VS Code扩展中使用。 我正在Windows 10上工作。 在开发和调试模式下,我可以毫无问题地运行此代码:

def analyse_file(filePath,lang,tools):
    volume_bindings = mount_volumes(os.path.dirname(filePath))
    lang_version = get_lang_version(filePath,lang)

    pool = multiprocessing.Pool(multiprocessing.cpu_count())
    results = []

    results = [pool.apply(start_container,args=(
        filePath,lang_version,volume_bindings,tool)) for tool in tools]
    pool.close()
    return results

使用pygls TCP / IP运行开发模式,并使用pygls STDIO运行生产模式。 但是发布后,它就挂在了池子上。该功能不在主文件中。在Windows中是否还有其他方法可以并行执行而无需多处理?

源代码位于https://github.com/1140251/Ethsential中。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)