def spin_forever():
    while True:
        time.sleep(1)
print('starting new process')
p = mp.Process(target=spin_forever)
print('created')
p.start()
print('started--generating result')
return flask.render_template_string('awesome')
Using python's Multiprocessing makes response hang on gunicorn