以下代码未启动,池或进程方法。请帮忙。
if __name__ == '__main__':
@client.event
async def on_message(message):
if message.guild is not None:
if (message.content.startswith('%season15')):
input = str(message.content[len('%season15'):].strip())
df = get_data(input) ##this line of code is processed
p = Pool(processes=3)
result = p.starmap(get_season_data, [(input,df,5),(input,df, 10),(input,df,15)])
processes = [Process(target=get_season_data, args=(symbol, df, i)) for i in [5,10,15]]
# Run processes
for p in processes:
p.start()
# Exit the completed processes
for p in processes:
p.join()
client.run('token#')
代码确实在任务管理器中启动了多个python进程,但是没有处理get_season_data中的任何代码并且不会抛出任何错误。