使用管理器后出现Python多处理运行时错误

使用管理器后出现Python多处理运行时错误,python,Python,我正在尝试使用manager在两个不同的进程中共享列表。当我使用它时,它会给我以下运行时错误: RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. This probably means that you are not using fork to

我正在尝试使用manager在两个不同的进程中共享列表。当我使用它时,它会给我以下运行时错误:

RuntimeError:
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
不管有没有“freeze_support()”,它都会给我同样的错误。(我不知道这是否相关,但其中一个过程是Flask服务器)。我怎样才能解决这个问题

我的代码:

def loop():
    while True:
        make_file()
        time.sleep(5)

def run_app():
    app.run(debug=True, use_reloader=False)

if __name__ == "__main__":
    freeze_support()
    p = Process(target=loop)
    p2 = Process(target=run_app)
    p.start()
    p2.start()
    p.join()
    p2.join()    
在所有这些之前,经理被宣布:

manager = Manager()

blockchain = manager.list()
mining_queue = manager.list()