I have a Flask-based program that (as to me) is essentially equivalent to the example in SO answer https://stackoverflow.com/a/14180227 (source: https://github.com/stackforge/ironic-discoverd/blob/master/ironic_discoverd/main.py), simplified:
eventlet.monkey_patch(thread=False) # change to True to break
@app.route('/', methods=['GET', 'POST'])
def api():
eventlet.greenthread.spawn_n(do_some_job) # is not called
def main():
app.run()
When I use eventlet.monkey_patch(thread=False) everything is fine. When I set thread=True, eventlet.greenthread.spawn_n (e.g. https://github.com/stackforge/ironic-discoverd/blob/master/ironic_discoverd/introspect.py#L76) here just does nothing, i.e. control is never yielded to it, though Flask should have been patched.
Any ideas?
Eventlet 0.15.2, Python 2.7.5, Flask 0.10.1