Closed zhou13 closed 1 year ago
Thanks, and sorry I took so long to look at this, I had some time off.
I'm not sure if this is the best way to fix the problem. request
returns a request id that can be used to cancel the in flight request. So if a user saves the file again while the first request is not done yet, the plugin should cancel the first request.
And the plugin can also keep track of the last request id to only allow results from that one.
Thank you for the feedback. Keeping track of requests would be a more efficient way to implement this. However, I have been using my branch with some slow formaters for a while and am quite satisfied. I probably won't have enough momentum to make another implementation in the near future.
:+1: all good. I'll have a go at this when I have some time
There is a racing condition (#71) when I
This PR fixed the racing condition in #71 by checking to not run two formaters at the same time.