This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# please use python3 and flask > 1.0 | |
# run this with : python3 flask_separate_thread.py | |
# https://web.archive.org/web/20210329135424/https://pymotw.com/3/threading/ | |
# https://web.archive.org/web/20210329135553/https://eli.thegreenplace.net/2011/08/22/how-not-to-set-a-timeout-on-a-computation-in-python | |
import time | |
import threading | |
from flask import Flask | |
app = Flask(__name__) |