You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggested by pStyl3, and I certainly wished I had one when testing masterlist parsing failures yesterday. To support this:
Create a framework for cancelling JS<->C++ queries, using cefQueryCancel()
Ensure each cancellable operation is transactional, probably the easiest way to do this is by not modifying the LOOT state object until the end of the operation.
Add cancellation points at logical points in each cancellable operation.
The following operations would be affected:
Changing game
Masterlist update
Plugin sorting
Content refresh
Conflicting plugins filtering
These processes would have to be adapted to ensure that early exit doesn't result in partial changes being made, unless such changes wouldn't have an adverse effect (for example, only fully-loading some plugins would be OK).
The text was updated successfully, but these errors were encountered:
Unfortunately, cancelling a query is a little messy because although notifying the C++ side is easy enough, a callback can't be called for a cancelled query, so the query's promise never settles. To make matters worse, ES2015 promises can't have their state changed externally, so the JS query cancel function can't just reject the query's promise.
To get around this, I check a cancelled boolean once a second while the promise is pending, and reject the promise an undefined reason if the boolean is true. The boolean is initialised to false and set to true by the query cancel function. The promise rejection handler has been updated to not display an error if the reason is undefined.
Suggested by pStyl3, and I certainly wished I had one when testing masterlist parsing failures yesterday. To support this:
cefQueryCancel()
The following operations would be affected:
These processes would have to be adapted to ensure that early exit doesn't result in partial changes being made, unless such changes wouldn't have an adverse effect (for example, only fully-loading some plugins would be OK).
The text was updated successfully, but these errors were encountered: