alex6480 / studycards

Temporary
MIT License
0 stars 0 forks source link

Clever set meta updating #19

Open alex6480 opened 6 years ago

alex6480 commented 6 years ago

When set meta is updated, the following should be done to prevent conflicts:

  1. Set meta is updated and the request is being sent to the server
  2. Before the request is complete, the set meta is updated again
  3. The first request is cancelled and a new request that is the result of both updates is sent.

That way only one request will be sent at once to prevent race conditions. And the request will include information from previous cancelled requests.