title: How can I add a background thread to flask?
body: <p>I'm busy writing a small game server to try out flask. The game exposes an API via REST to users. It's easy for users to perform actions and query data, however I'd like to service the <code>&quot;game world&quot;</code> outside the <code>app.run()</code> loop to update game entities, etc. Given that Flask is so cleanly implemented, I'd like to see if there's a Flask way to do this.</p>