Answer the question
In order to leave comments, you need to log in
How to solve the problem with multiprocessing (Windows)?
Dealing with multiprocessing, I ran into such a problem.
def start():
print(f"[{multiprocessing.current_process().name}]")
@bp.on.chat_message(text=["дуэль <member>", "дуэль"])
async def shot_handler(message: Message, member = None):
if member is None:
await message.answer("Укажите вашего соперника через @...")
else:
try:
players.append([message._mention.id, message.from_id])
if __name__ == '__main__':
multiprocessing.Process(target = start, name = f"{message._mention.id}").start()
except:
await message.answer("Возможно вы допустили ошибку")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question