eshaan7 / Flask-Shell2HTTP

Execute shell commands via HTTP server (via flask's endpoints).
https://flask-shell2http.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
170 stars 28 forks source link

`future.done()` and `callback_fn` race condition #31

Open eshaan7 opened 2 years ago

eshaan7 commented 2 years ago

When using &wait=true, the callback_fn cannot be used to modify the result because it is called after the future completes.

This happens if one calls future.done() to wait before the callback fn is executed, it would not work as intended.