Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for locked after unlocked #10884

Conversation

colin-grant-work
Copy link
Contributor

What it does

Fixes #10824 by checking whether the queue is in use before disposing of it. Apparently new actions could be enqueued between the resolution of the watiForUnlock promise and the actual running of the wait for unlick code.

How to test

  1. I have added a test that ensures that preference transactions can handle many synchronous settings: observe that that passes.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added bug bugs found in the application preferences issues related to preferences labels Mar 15, 2022
@colin-grant-work colin-grant-work force-pushed the bugfix/preference-transaction-queue branch from 97be6e1 to a396ebb Compare March 15, 2022 01:04
@colin-grant-work colin-grant-work marked this pull request as draft March 15, 2022 01:27
@colin-grant-work colin-grant-work force-pushed the bugfix/preference-transaction-queue branch from a104454 to 240a279 Compare March 15, 2022 21:51
@colin-grant-work colin-grant-work marked this pull request as ready for review March 15, 2022 21:51
@colin-grant-work
Copy link
Contributor Author

@msujew, I believe that this fixes the problems with multiple preference settings occurring synchronously. It also appears to fix the message about the file being dirty, although it doesn't directly address it - all of my attempts to address it directly have only made things worse, so I've left them out of this PR.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Colin, works great!

  • Setting multiple preferences in parallel correctly updates all of them
  • Fixes the errors/issues experienced when quickly changing themes
  • The test passes

@colin-grant-work colin-grant-work merged commit 173e8b1 into eclipse-theia:master Mar 23, 2022
@colin-grant-work colin-grant-work deleted the bugfix/preference-transaction-queue branch March 23, 2022 16:10
@colin-grant-work colin-grant-work added this to the 1.24.0 milestone Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application preferences issues related to preferences
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preference Transactions Failing when Run in Parallel
2 participants