我目前有一个app.route,当它被触发时,它会启动一个线程,并假设返回一个模板。但是,它当前没有返回模板,但是如果我注释掉线程,它就会返回。是否有任何解决方法?
@app.route('/start', methods=['POST'])
def start():
windowname = request.form['windowname']
Thread(target = runBot(windowname)).start() #when commented out the next line is called
return render_template('bot.html', isActive = True) #this line isn't being called
慕村225694
相关分类