mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-11 06:27:23 +08:00
🐛 Linux下创建子进程出错的问题 fork -> spawn
This commit is contained in:
commit
b05bbf2f19
@ -1,11 +1,11 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"module_name": "liteyuki-plugin-nonebot",
|
"module_name": "liteyukibot-plugin-nonebot",
|
||||||
"project_link": "liteyuki-plugin-nonebot",
|
"project_link": "liteyukibot-plugin-nonebot",
|
||||||
"name": "NoneBot插件",
|
"name": "NoneBot插件",
|
||||||
"desc": "在轻雪中使用NoneBot,支持NoneBot2,为NoneBot开发者提供了更多便捷功能(已内置)",
|
"desc": "在轻雪中使用NoneBot,为NoneBot开发者提供了更多便捷功能(已内置)",
|
||||||
"author": "snowykami",
|
"author": "snowykami",
|
||||||
"homepage": "https://github.com/LiteyukiStudio/LiteyukiBot",
|
"homepage": "https://github.com/LiteyukiStudio/liteyukibot-plugin-nonebot",
|
||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"label": "server",
|
"label": "server",
|
||||||
|
@ -8,7 +8,7 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
|
|||||||
@File : manager.py
|
@File : manager.py
|
||||||
@Software: PyCharm
|
@Software: PyCharm
|
||||||
"""
|
"""
|
||||||
|
import multiprocessing
|
||||||
import threading
|
import threading
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
from typing import Any, Callable, TYPE_CHECKING, TypeAlias
|
from typing import Any, Callable, TYPE_CHECKING, TypeAlias
|
||||||
@ -33,6 +33,7 @@ TIMEOUT = 10
|
|||||||
__all__ = [
|
__all__ = [
|
||||||
"ProcessManager"
|
"ProcessManager"
|
||||||
]
|
]
|
||||||
|
multiprocessing.set_start_method("spawn", force=True)
|
||||||
|
|
||||||
|
|
||||||
class ChannelDeliver:
|
class ChannelDeliver:
|
||||||
|
Loading…
Reference in New Issue
Block a user