'Python Flask webpage stalls as long as the POST request task

In Python Flask I'm sending a POST request with some network tasks. All works fine, but the Flask website stalls (freezes) as long as the task is working on it. For example animated.gif also freezes as long as the task is lasting. I tried app.run(threaded=True), but that doesn't change.

Any suggestion?



Solution 1:[1]

If I understand correctly, setting theaded=True, only means that it will process multiple request but each request is still handled by a single thread. If you can't cut down on the processing time, you could try better ways for dealing with the long running task on the UI.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tim