-
Notifications
You must be signed in to change notification settings - Fork 321
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
Avoid unnecessary lock on UI thread with no model listeners #3252
Avoid unnecessary lock on UI thread with no model listeners #3252
Conversation
@@ -563,6 +563,9 @@ protected <T> T internalReadOnly(IUnitOfWork<T, XtextResource> work, boolean isC | |||
* changing while they run. To achieve this, we run the {@link IXtextModelListener}s on the UI thread. | |||
*/ | |||
private void notifyModelListenersOnUiThread() { | |||
if(modelListeners.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The modelListeners should not be accessed outside of a synchronization block. Please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
7783fd5
to
8a80d14
Compare
can you please rebase |
…text#3251 Avoid unnecessarily aquiring a lock on the UI thread if there are no model listeners in the Xtext document. Signed-off-by: Martin Jobst <[email protected]>
8a80d14
to
da7fed8
Compare
@szarnekow is it OK to merge it now? |
Thank you |
Avoid unnecessarily aquiring a lock on the UI thread if there are no model listeners in the Xtext document.
Closes #3251