🐛 Linux下创建子进程出错的问题 fork -> spawn

This commit is contained in:
远野千束 2024-08-18 11:51:18 +08:00
commit b05bbf2f19
2 changed files with 7 additions and 6 deletions

View File

@ -1,11 +1,11 @@
[
{
"module_name": "liteyuki-plugin-nonebot",
"project_link": "liteyuki-plugin-nonebot",
"module_name": "liteyukibot-plugin-nonebot",
"project_link": "liteyukibot-plugin-nonebot",
"name": "NoneBot插件",
"desc": "在轻雪中使用NoneBot支持NoneBot2为NoneBot开发者提供了更多便捷功能(已内置)",
"desc": "在轻雪中使用NoneBot为NoneBot开发者提供了更多便捷功能(已内置)",
"author": "snowykami",
"homepage": "https://github.com/LiteyukiStudio/LiteyukiBot",
"homepage": "https://github.com/LiteyukiStudio/liteyukibot-plugin-nonebot",
"tags": [
{
"label": "server",

View File

@ -8,7 +8,7 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@File : manager.py
@Software: PyCharm
"""
import multiprocessing
import threading
from multiprocessing import Process
from typing import Any, Callable, TYPE_CHECKING, TypeAlias
@ -33,6 +33,7 @@ TIMEOUT = 10
__all__ = [
"ProcessManager"
]
multiprocessing.set_start_method("spawn", force=True)
class ChannelDeliver: