def run_with_reloader(main_func, extra_files=None, interval=1):
    import signal
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
    if os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
        thread.start_new_thread(main_func, ())
        try:
            reloader_loop(extra_files, interval)
        except KeyboardInterrupt:
            return
    try:
        sys.exit(restart_with_reloader())
    except KeyboardInterrupt:
        pass
Run the given function in an independent python interpreter.
dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/serving.py/run_with_reloader